Skip to content

Commit

Permalink
Bump transformers to 4.37 (mosaicml#2894)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg authored and ShashankMosaicML committed Feb 3, 2024
1 parent 414109e commit cb3434b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def package_files(prefix: str, directory: str, extension: str):
]

extra_deps['nlp'] = [
'transformers>=4.11,<4.37,!=4.34.0',
'transformers>=4.11,<4.38,!=4.34.0',
'datasets>=2.4,<3',
]

Expand Down
2 changes: 2 additions & 0 deletions tests/models/test_hf_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,7 @@ def test_separate_eval_metrics(tiny_bert_model, tiny_bert_tokenizer):

@pytest.mark.parametrize('checkpoint_upload_folder', [None, 's3://checkpoints-bucket/'])
@pytest.mark.parametrize('local_save_filename', [None, 'local-checkpoint.pt'])
@pytest.mark.filterwarnings('ignore:TypedStorage is deprecated.*:UserWarning')
def test_write_hf_from_composer(checkpoint_upload_folder, local_save_filename, tiny_bert_model, tiny_bert_tokenizer,
tmp_path):
transformers = pytest.importorskip('transformers')
Expand Down Expand Up @@ -945,6 +946,7 @@ def test_write_hf_from_composer(checkpoint_upload_folder, local_save_filename, t
check_hf_model_equivalence(tiny_bert_model, loaded_hf_model)


@pytest.mark.filterwarnings('ignore:TypedStorage is deprecated.*:UserWarning')
def test_write_hf_from_composer_direct(tiny_bert_tokenizer, tmp_path):
# tests that the logic to write out a huggingface checkpoint from a composer checkpoint
# still works when the huggingface model is instantiated directly rather than using from_pretrained
Expand Down

0 comments on commit cb3434b

Please sign in to comment.