Skip to content

Replace deprecated WANDB_LOG_MODEL=true with end in HF optimize notebook#631

Open
johndmulhausen wants to merge 1 commit into
mainfrom
fix/issue-572-wandb-log-model
Open

Replace deprecated WANDB_LOG_MODEL=true with end in HF optimize notebook#631
johndmulhausen wants to merge 1 commit into
mainfrom
fix/issue-572-wandb-log-model

Conversation

@johndmulhausen

Copy link
Copy Markdown
Contributor

Problem

Optimize_Hugging_Face_models_with_Weights_&_Biases.ipynb sets %env WANDB_LOG_MODEL=true. Modern transformers no longer accepts true — the WandbLogModel enum only accepts end, checkpoint, or false, so running the notebook crashes with:

ValueError: 'true' is not a valid WandbLogModel

(with a DeprecationWarning telling users to use 'end' or 'checkpoint' instead).

Fix

  • Code cell: %env WANDB_LOG_MODEL=true%env WANDB_LOG_MODEL=end
  • Markdown tip: updated to say set WANDB_LOG_MODEL to end (mentioning checkpoint as the alternative for per-checkpoint logging), and fixed the "varilable" typo on the same line

No other changes; the notebook JSON is otherwise untouched.

Verification

Against the current transformers release in a fresh venv:

>>> WandbLogModel('end')         # ok
>>> WandbLogModel('checkpoint')  # ok
>>> WandbLogModel('true')        # raises, as reported in the issues

Notebook validated with nbformat.validate(...) (nbformat 4) — passes. grep confirms no remaining WANDB_LOG_MODEL=true in this notebook.

Fixes #572
Fixes #598

🤖 Generated with Claude Code

Modern transformers raises ValueError: 'true' is not a valid WandbLogModel.
Use 'end' to log the final model as an artifact, and mention 'checkpoint'
as the alternative for per-checkpoint logging. Also fixes the 'varilable'
typo on the same line.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 17, 2026 17:14
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Hugging Face optimization Colab notebook to use the current transformers-supported WANDB_LOG_MODEL values, preventing runtime failure caused by the deprecated true setting.

Changes:

  • Replaced %env WANDB_LOG_MODEL=true with %env WANDB_LOG_MODEL=end to match WandbLogModel enum expectations.
  • Updated the related markdown tip to recommend end (and mention checkpoint), and fixed a spelling typo (“varilable” → “variable”).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@johndmulhausen
johndmulhausen marked this pull request as ready for review July 21, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants