Created
August 7, 2017 00:03
-
-
Save JoshBroomberg/242b34a6af945ae4834362ff7a2b6974 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@celery.task | |
def async_training_task(data_file_name, k_iterations): | |
train_model(file=data_file_name, iterations=k_iterations) | |
# This is the standard flask handler. | |
# Maybe you get some params from the request/ | |
def get(self, request): | |
async_training_task.delay(data_file_name=request.file_name, iterations=10) | |
return Response("Training has been started!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment