Closed justinvdm closed 5 months ago
We can tell the cli earlier than we currently do that there is no work for it to do: * for shape prediction, we create a job regardless. If all the inputs are cached, that job will end soon. But the cli still polls afterwards until the API tells it that job is done. We could probably short-circuit all of the that by checking the cache before hand and telling the cli at the start that it doesn't need to wait. * for data generation, we only create jobs if there are columns which don't have descriptions. We then later poll till there are no more in progress jobs. We could probably short circuit all that by telling the cli at the start if there's no jobs to wait for
Demo
https://www.loom.com/share/a9186b8d2a814f8e924c71b50940058f?from_recorder=1&focus_title=1
Changes
In https://github.com/snaplet/snaplet/pull/2639, when
startPredictionJobRoute
endpoint called, we return whether there are incomplete (shape or data generation) jobs. This PR is for using this new information to avoid the extra round trip.