Saturday, May 17, 2014

Essay Scoring - Developers Notes

These notes are meant only for developers:

NOTES FOR USING DISCERN

1. To start Discern on Amazon Linux, always must be ec2-user

2. To start Discern on local linux box, always must be mike  (windsurf44)

DJANGO WILL NOT WORK OTHERWISE!!!!!!!!!!!

3. Celery log should be in /tmp/  Be sure to look here.


Changes 5/17/2014

- Added redis-cli flushall command to startup scripts. This will remove any lingering tasks that need to be removed after a reboot.

- Upgraded Celery to latest  (pip install --upgrade celery)  // Done to address runaway CPU issue (seems to have been caused by website indexing program in the discern implementation that is totally not needed - disabled below)
- Re-installed django-celery (pip install --upgrade django-celery)  // Not sure why needed by was.
- Added CELERY_ACCEPT_CONTENT['pickle','json'] to discern/discern/settings.py to remove deprecation error.
- changed discern/discern/settings.py -> DEBUG to False  // also requires change to ALLOWED_HOSTS
- added entry '*' to ALLOWED_HOSTS in discern/discern/settings.py
- Changed java programs to remove all non-ascii chars from essays before submitting. Was an issue not sure why. So, if ever expand to other languages, need to deal with this.
- Disabled Celery Task to regenerate index:  discern/freeform_data/tasks.py  - this is important because the model 'file' is stored at discern/ml_models_api and these files are impossible to index, so having a website indexing program run is a massive CPU sucker.
- Changed task to evaluate whether to re-create models to fire every 30 minutes rather than every minute. discern/settings.py -> TIME_BETWEEN_ML_CREATOR_CHECKS = 30*60
- Changed task to evaluate whether to score essays to 60 seconds.  TIME_BETWEEN_ML_GRADER_CHECKS= 60


DISCERN NOTES:

1. create directory like /work
2. install virtualenv if not already installed.
3. virtualenv /work
4. cd /work
5. source bin/activate
6. git clone git://github.com/edx/discern.git
7. cd discern
8. pip install -r pre-requirements.txt
9. pip install -r requirements.txt
10. Install Ease per below
11. chmod 777 -R /work
12. Edit discern/settings.py to change database, turn off debug, etc.
12. python manage.py syncdb --settings=discern.settings --noinput --pythonpath=.
13. python manage.py migrate --settings=discern.settings --noinput --pythonpath=.
14. python manage.py collectstatic -c --noinput --settings=discern.settings --pythonpath=

Next, you need to create a user and an organization. Refer to docs to do this with python.
http://cfmedia.clicflic.com/web/misc/discerndocs/index.html

TO INSTALL EASE

go to /work/discern

git clone git://github.com/edx/ease.git

change to ease directory
python setup.py build
python setup.py install

Note: You must have root privileges (no sudo) to install into a virtualenv

DEVELOPMENT COMPUTER

There are two logons - root and mike.





No comments:

Post a Comment