Skip to content

[Bug]: Optimize_Hugging_Face_models_with_Weights_&_Biases.ipynb uses deprecated WANDB_LOG_MODEL=true #572

@travis-the-dragon

Description

@travis-the-dragon

Tell us what happened?

Please tell us which example failed and why. Please link the wandb.ai logs if you have one.

Running this notebook:
https://colab.research.google.com/github/wandb/examples/blob/master/colabs/huggingface/Optimize_Hugging_Face_models_with_Weights_&_Biases.ipynb#scrollTo=t2mS3c0ZURB5

on the cell that starts with python run_glue.py \

Fails with this error:

ValueError: 'true' is not a valid WandbLogModel

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/content/run_glue.py", line 637, in <module>
    main()
  File "/content/run_glue.py", line 528, in main
    trainer = Trainer(
  File "/usr/local/lib/python3.10/dist-packages/transformers/trainer.py", line 598, in __init__
    self.callback_handler = CallbackHandler(
  File "/usr/local/lib/python3.10/dist-packages/transformers/trainer_callback.py", line 403, in __init__
    self.add_callback(cb)
  File "/usr/local/lib/python3.10/dist-packages/transformers/trainer_callback.py", line 420, in add_callback
    cb = callback() if isinstance(callback, type) else callback
  File "/usr/local/lib/python3.10/dist-packages/transformers/integrations/integration_utils.py", line 773, in __init__
    self._log_model = WandbLogModel(os.getenv("WANDB_LOG_MODEL", "false"))
  File "/usr/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/lib/python3.10/enum.py", line 718, in __new__
    raise exc
  File "/usr/lib/python3.10/enum.py", line 700, in __new__
    result = cls._missing_(value)
  File "/usr/local/lib/python3.10/dist-packages/transformers/integrations/integration_utils.py", line 747, in _missing_
    raise DeprecationWarning(
DeprecationWarning: Setting `WANDB_LOG_MODEL` as true is deprecated and will be removed in version 5 of transformers. Use one of `'end'` or `'checkpoint'` instead.

Sub-issues

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions