We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0069195 commit 2d3ed8dCopy full SHA for 2d3ed8d
tests/modules/test_hf_model.py
@@ -23,6 +23,8 @@ def test_load_gated_model(mocker: MockerFixture):
23
24
def test_load_ungated_model(mocker: MockerFixture):
25
conf = MockConfig(architectures=["ConditionalGeneration"])
26
+ # Mock the environment to ensure no default token is used
27
+ mocker.patch.dict('os.environ', {}, clear=True) # Clear environment variables
28
mocker.patch("transformers.AutoModelForSeq2SeqLM.from_pretrained")
29
mocker.patch("transformers.AutoConfig.from_pretrained", return_value=conf)
30
mocker.patch("transformers.AutoTokenizer.from_pretrained")
0 commit comments