Asynchronous tasks in OmegaML
I have a question concerning asynchronous tasks in omega.
Currently, we have an endpoint that make fit-generate, and returns a message with status 200 to the User when synth dataset was generated.
Are there any options to make fit and generate asynchronously?
The flow should be the next:
- User makes a request on the fit-generate endpoint
- we make a call on the om.runtime().fit()
- User gets a status 200 and message like "Your request is processing"
At the same time on the backend we:
- fitting the model
- just after it was fitted om.runtime().predict() should be called (to generate a synth dataset)
- After fitting was done, User can see a synthetic dataset created with the status SUCCESSES
The question is:
How can I provide such a functionality when both fit() and predict() are performing asynchronously?
... and predict() will be called automatically just after the fit() was ended?