Skip to content

Commit

Permalink
rename var & use org model
Browse files Browse the repository at this point in the history
  • Loading branch information
fxmarty committed Jun 14, 2024
1 parent 63bec16 commit fed103c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_onnxruntime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Test with pytest (in parallel)
env:
FXMARTYCLONE_READ_TOKEN: ${{ secrets.FXMARTYCLONE_HUB_READ_TOKEN }}
FXMARTYCLONE_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
working-directory: tests
run: |
pytest onnxruntime -m "not run_in_series" --durations=0 -vvvv -s -n auto
6 changes: 3 additions & 3 deletions tests/onnxruntime/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,14 +938,14 @@ def test_stable_diffusion_model_on_rocm_ep_str(self):
self.assertListEqual(model.providers, ["ROCMExecutionProvider", "CPUExecutionProvider"])

def test_load_model_from_hub_private(self):
token = os.environ.get("FXMARTYCLONE_READ_TOKEN", None)
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 `FXMARTYCLONE_READ_TOKEN`."
"Test requires a token for fxmartyclone in the environment variable `HF_HUB_READ_TOKEN`."
)

model = ORTModelForCustomTasks.from_pretrained("fxmartyclone/tiny-onnx-private-2", use_auth_token=token)
model = ORTModelForCustomTasks.from_pretrained("optimum-internal-testing/tiny-random-phi-private", use_auth_token=token)
self.assertIsInstance(model.model, onnxruntime.InferenceSession)
self.assertIsInstance(model.config, PretrainedConfig)

Expand Down

0 comments on commit fed103c

Please sign in to comment.