You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be useful to create a Python SDK for CodaLab. This would make it easier to run jobs in a matrix, or automate repeatable tasks, or even just interact with CodaLab in general -- and it would probably work better than having to create a CLI wrapper as mentioned in #2350.
Perhaps usage of it would look something like this:
importcodalab# run a bundleuuid=codalab.run("echo hello world")
codalab.wait(uuid)
print(codalab.cat(uuid))
# upload a filewithopen("input.txt") asf:
codalab.upload(f)
# run matrix jobs and wait for all bundles to finishuuids= []
foriinrange(0, 100):
uuids.push(codalab.run("echo hello world {}".format(i)))
codalab.wait(uuids)
Other benefits of such an integration:
This would make it really easy to call CodaLab from a Jupyter notebook -- essentially, it would be an interactive job runner at that point.
Once the Python SDK is ready, we could in fact refactor the CLI to use the CodaLab Python SDK. This would not only reduce code duplication, but would also make our codalab tests faster / easier to create / more readable, because we could move our tests to directly use the Python SDK instead of always using the CLI (and keep just a base set of tests to test CLI integration).
In the long run, the SDK model is good if we ever were to expand to other languages.
The text was updated successfully, but these errors were encountered:
It might be useful to create a Python SDK for CodaLab. This would make it easier to run jobs in a matrix, or automate repeatable tasks, or even just interact with CodaLab in general -- and it would probably work better than having to create a CLI wrapper as mentioned in #2350.
Perhaps usage of it would look something like this:
Other benefits of such an integration:
The text was updated successfully, but these errors were encountered: