File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11spacy >= 3.4.0 ,< 4.0.0
2- transformers >= 3.4.0 ,< 4.25 .0
2+ transformers >= 3.4.0 ,< 4.26 .0
33torch >= 1.6.0
44srsly >= 2.4.0 ,< 3.0.0
55dataclasses >= 0.6 ,< 1.0 ; python_version < "3.7"
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ include_package_data = true
3232python_requires = >=3.6
3333install_requires =
3434 spacy>=3.4.0,<4.0.0
35- transformers>=3.4.0,<4.25 .0
35+ transformers>=3.4.0,<4.26 .0
3636 torch>=1.6.0
3737 srsly>=2.4.0,<3.0.0
3838 dataclasses>=0.6,<1.0; python_version < "3.7"
Original file line number Diff line number Diff line change @@ -116,9 +116,12 @@ def test_transformer_pipeline_todisk_settings():
116116 assert trf .model .transformer .config .output_attentions is False
117117 assert "attentions" not in nlp ("test" )._ .trf_data .model_output
118118 # modify model_max_length (note that modifications to
119- # tokenizer.model_max_length are not serialized by save_pretrained
120- # see: https://github.com/explosion/spaCy/discussions/7393)
119+ # tokenizer.model_max_length for transformers<4.25 are not serialized by
120+ # save_pretrained, see: https://github.com/explosion/spaCy/discussions/7393)
121121 trf .model .tokenizer .init_kwargs ["model_max_length" ] = 499
122+ # transformer>=4.25, model_max_length is saved and init_kwargs changes are
123+ # clobbered, so do both for this test
124+ trf .model .tokenizer .model_max_length = 499
122125 # add attentions on-the-fly
123126 trf .model .transformer .config .output_attentions = True
124127 assert nlp ("test" )._ .trf_data .model_output .attentions is not None
You can’t perform that action at this time.
0 commit comments