Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove read token #1903

Merged
merged 4 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test_onnxruntime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
pytest onnxruntime -m "run_in_series" --durations=0 -vvvv -s

- name: Test with pytest (in parallel)
env:
FXMARTYCLONE_READ_TOKEN: ${{ secrets.FXMARTYCLONE_HUB_READ_TOKEN }}
fxmarty marked this conversation as resolved.
Show resolved Hide resolved
working-directory: tests
run: |
pytest onnxruntime -m "not run_in_series" --durations=0 -vvvv -s -n auto
9 changes: 6 additions & 3 deletions tests/onnxruntime/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,9 +938,12 @@ def test_stable_diffusion_model_on_rocm_ep_str(self):
self.assertListEqual(model.providers, ["ROCMExecutionProvider", "CPUExecutionProvider"])

def test_load_model_from_hub_private(self):
subprocess.run("huggingface-cli logout", shell=True)
# Read token of fxmartyclone (dummy user).
token = "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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you revoked this token @fxmarty ? (I imagine that yes but just to make sure)

token = os.environ.get("FXMARTYCLONE_READ_TOKEN", None)

if token is None:
self.skipTest(
"Test requires a token for fxmartyclone in the environment variable `FXMARTYCLONE_READ_TOKEN`."
)

model = ORTModelForCustomTasks.from_pretrained("fxmartyclone/tiny-onnx-private-2", use_auth_token=token)
fxmarty marked this conversation as resolved.
Show resolved Hide resolved
self.assertIsInstance(model.model, onnxruntime.InferenceSession)
Expand Down
Loading