Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Oct 14, 2024
1 parent 7241dde commit 5a31040
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/onnxruntime/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,9 +974,13 @@ def test_load_model_from_hub_private(self):
token = os.environ.get("HF_HUB_READ_TOKEN", None)

if token is None:
self.skipTest("Test requires a token for fxmartyclone in the environment variable `HF_HUB_READ_TOKEN`.")
self.skipTest(
"Test requires a read token for optimum-internal-testing in the environment variable `HF_HUB_READ_TOKEN`."
)

model = ORTModelForCustomTasks.from_pretrained("optimum-internal-testing/tiny-random-phi-private", token=token)
model = ORTModelForCustomTasks.from_pretrained(
"optimum-internal-testing/tiny-random-phi-private", token=token, export=True
)

self.assertIsInstance(model.model, onnxruntime.InferenceSession)
self.assertIsInstance(model.config, PretrainedConfig)
Expand Down

0 comments on commit 5a31040

Please sign in to comment.