iterative / dvclive

📈 Log and track ML metrics, parameters, models with Git and/or DVC
https://dvc.org/doc/dvclive
Apache License 2.0
165 stars 36 forks source link

hf: warn of deprecating internal callback #740

Closed dberenbaum closed 7 months ago

dberenbaum commented 11 months ago

Adds a deprecation notice about the internal HF callback and suggests to use the new external callback, which will be available in the next release of https://github.com/huggingface/transformers.

Also adds the external callback to tests since there weren't similar tests in the transformers library, and updates the example notebook.

codecov-commenter commented 11 months ago

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (8406920) 88.79% compared to head (8e9afeb) 95.53%. Report is 9 commits behind head on main.

Files Patch % Lines
src/dvclive/fabric.py 82.66% 10 Missing and 3 partials :warning:
tests/frameworks/test_fabric.py 83.33% 6 Missing :warning:
src/dvclive/lightning.py 70.58% 3 Missing and 2 partials :warning:
src/dvclive/utils.py 79.16% 4 Missing and 1 partial :warning:
tests/frameworks/test_lightning.py 94.11% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #740 +/- ## ========================================== + Coverage 88.79% 95.53% +6.73% ========================================== Files 53 55 +2 Lines 3357 3513 +156 Branches 294 312 +18 ========================================== + Hits 2981 3356 +375 + Misses 337 110 -227 - Partials 39 47 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dberenbaum commented 10 months ago

Docs PR: https://github.com/iterative/dvc.org/pull/4994

The dvclive callback has now been released in both upstream packages:

This one is ready to merge

dberenbaum commented 10 months ago

Tests need an updated version of transformers from https://github.com/huggingface/transformers/pull/27983 to pass

dberenbaum commented 9 months ago

@shcheklein A new hf transformers release was finally published and all tests are now passing. Could you take a look so we can get this merged please?

dberenbaum commented 9 months ago

One item caught my attention - using an internal callback in the notebook. I didn't check also the details of the code.

Fixed that but also found a new issue and will now need to wait for https://github.com/huggingface/transformers/pull/28653 and one more release for the added test to pass ☚ī¸.

mattseddon commented 8 months ago

Will take a look after the tests are passing 🙏đŸģ.

dberenbaum commented 8 months ago

Will take a look after the tests are passing 🙏đŸģ.

👍 Tests pass on the upstream version of transformers, so just waiting for the next release from them.

dberenbaum commented 7 months ago

@mattseddon The next release of transformers is out and tests are passing. Do you still want to take a look?