update tasks.py for machine learning