Skip to content

Commit

Permalink
Update CLM and MLM examples
Browse files Browse the repository at this point in the history
  • Loading branch information
regisss committed Apr 9, 2024
1 parent 0b14d8e commit 2da6d49
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/language-modeling/run_clm.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def check_optimum_habana_min_version(*a, **b):
check_min_version("4.38.0")
check_optimum_habana_min_version("1.10.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
require_version("datasets>=2.14.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")


MODEL_CONFIG_CLASSES = list(MODEL_FOR_CAUSAL_LM_MAPPING.keys())
Expand Down
2 changes: 1 addition & 1 deletion examples/language-modeling/run_mlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def check_optimum_habana_min_version(*a, **b):
check_min_version("4.38.0")
check_optimum_habana_min_version("1.10.0")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
require_version("datasets>=2.14.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")


MODEL_CONFIG_CLASSES = list(MODEL_FOR_MASKED_LM_MAPPING.keys())
Expand Down
4 changes: 2 additions & 2 deletions tests/example_diff/run_clm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
< # Will error if the minimal version of Transformers is not installed. Remove at your own risks.
< check_min_version("4.40.0.dev0")
61c55,61
< require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
< require_version("datasets>=2.14.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
---
> try:
> from optimum.habana.utils import check_optimum_habana_min_version
Expand All @@ -41,7 +41,7 @@
> check_min_version("4.38.0")
> check_optimum_habana_min_version("1.10.0")
>
> require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
> require_version("datasets>=2.14.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
>
80c86,87
< "The model checkpoint for weights initialization. Don't set if you want to train a model from scratch."
Expand Down
4 changes: 2 additions & 2 deletions tests/example_diff/run_mlm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
< # Will error if the minimal version of Transformers is not installed. Remove at your own risks.
< check_min_version("4.40.0.dev0")
60c54,60
< require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
< require_version("datasets>=2.14.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
---
> try:
> from optimum.habana.utils import check_optimum_habana_min_version
Expand All @@ -37,7 +37,7 @@
> check_min_version("4.38.0")
> check_optimum_habana_min_version("1.10.0")
>
> require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
> require_version("datasets>=2.14.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")
>
>
144c152
Expand Down

0 comments on commit 2da6d49

Please sign in to comment.