-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
DVCLive API code snippet in notebooks #4836
Comments
@tibor-mach there is more context/discussion in https://github.com/iterative/studio/issues/6422 / iterative/dvclive#635 PTAL. If you have strong opinions contributions are welcome. Code for the extension is here:
and Studio link is shown above. |
Thanks @mattseddon ! I agree with @omesser (this comment) especially on the sys.argv. The first thing I tried without thinking about the snippet (or even really reading it, frankly) was to copy-paste it into a notebook and run it. Obviously, it fails and with an error which is confusing at first (only at this point did I start actually reading the code of the snippet). Personally I would just go with Oded's example and perhaps just slightly simplify it for compactness in VS code. WDYT? If you agree I can make a PR (probably sometimes next week though) |
@tibor-mach I haven't seen that anyone else has strong opinions on the snippets, so I think you could make those changes and they will likely be approved without too much discussion. I think the main reason the previous discussion died was that it may not be that high impact to be worth the effort. If you have the time and there's nobody who is opposed to the changes, feel free to go for it! |
@tibor-mach it doesn't seem like this is a priority. Closing for now. |
In the extension -> setup -> experiments we have the following example under Python API:
This works nicely if you copy it to a script and run it from the command line. But if people expect to use this in a jupyter notebook (which they might with DVCLive) and then copy it to a cell and run it, this will fail since no arguments are received.
Maybe it would make sense to create an example which can be run in notebooks also? Just replacing
sys.argv[1]
with a positive integer constant should do it.The text was updated successfully, but these errors were encountered: