reiinakano / xcessiv

A web-based application for quick, scalable, and automated hyperparameter tuning and stacked ensembling in Python.
http://xcessiv.readthedocs.io
Apache License 2.0
1.27k stars 105 forks source link

Cancel/clear queued base learners #46

Open CSNoyes opened 7 years ago

CSNoyes commented 7 years ago

Accidentally executed a huge grid search. Even starting/stopping Redis and Xcessive won't clear the queue and theres no way to cancel all pending tasks. Please advise.

reiinakano commented 7 years ago

HI! I am aware of this issue and am currently mulling the best way to add an option to do this in the UI.

For now, please open up a Python interpreter and run the following script to delete all queued tasks from Xcessiv.

import xcessiv

PATH_TO_XCESSIV_PROJECT_FOLDER = "/path/to/xcessiv/project/folder/"

with xcessiv.functions.DBContextManager(PATH_TO_XCESSIV_PROJECT_FOLDER) as session:
    base_learners = session.query(xcessiv.models.BaseLearner).filter_by(job_status='queued').all()
    print(len(base_learners))
    for bl in base_learners:
        session.delete(bl)
    session.commit()

OPTIONAL: Finally, once you're done, it might be helpful to clear your Redis database to get rid of the junk. Take note that this step will cancel all pending tasks. To do this, run

redis-cli -n 8 flushdb to delete database 8 (default used by Xcessiv)

ejdanderson commented 6 years ago

It would be great if you could use the checkboxes (select all/select none) to do bulk actions for base learner - Add to stack, Delete, etc...