Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(make_dvcyaml): make it idempotent for artifacts #573

Merged
merged 1 commit into from
May 21, 2023

Conversation

shcheklein
Copy link
Member

Fixes code like this:

    with Live() as live:
        for _ in range(3):
            live.log_artifact("model.pth", type="model")
            live.next_step()

Here make_dvcyaml is called twice in a row at the end. Previous it was causing artifacts paths to be modified each time (adding a relative level of ..).


Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@shcheklein shcheklein added p1-important Include in the next sprint bug Did we break something? A: log_artifact Area: `live.log_artifact` A: dvcyaml Area: `live.make_dvcyaml` labels May 20, 2023
@shcheklein shcheklein requested a review from daavoo May 20, 2023 23:38
@shcheklein shcheklein self-assigned this May 20, 2023
@shcheklein shcheklein requested a review from dberenbaum May 20, 2023 23:38
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (03ec6cf) 96.14% compared to head (85daac9) 96.16%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #573      +/-   ##
==========================================
+ Coverage   96.14%   96.16%   +0.01%     
==========================================
  Files          43       43              
  Lines        2857     2871      +14     
  Branches      239      240       +1     
==========================================
+ Hits         2747     2761      +14     
  Misses         65       65              
  Partials       45       45              
Impacted Files Coverage Δ
src/dvclive/dvc.py 92.66% <100.00%> (+0.06%) ⬆️
tests/test_dvc.py 100.00% <100.00%> (ø)
tests/test_log_artifact.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@daavoo daavoo merged commit 31a7908 into main May 21, 2023
@daavoo daavoo deleted the make-make_dvcyaml-idempotent branch May 21, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: dvcyaml Area: `live.make_dvcyaml` A: log_artifact Area: `live.log_artifact` bug Did we break something? p1-important Include in the next sprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants