Skip to content

Commit

Permalink
style & remove token
Browse files Browse the repository at this point in the history
  • Loading branch information
fxmarty committed Jun 14, 2024
1 parent fed103c commit 7d3cbb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions optimum/utils/testing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
# Used to test the hub
USER = "__DUMMY_OPTIMUM_USER__"

# Not critical, only usable on the sandboxed CI instance.
TOKEN = "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"


def flatten_dict(dictionary: Dict):
"""
Expand Down
8 changes: 4 additions & 4 deletions tests/onnxruntime/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,11 +941,11 @@ 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 token for fxmartyclone in the environment variable `HF_HUB_READ_TOKEN`.")

model = ORTModelForCustomTasks.from_pretrained("optimum-internal-testing/tiny-random-phi-private", 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 7d3cbb3

Please sign in to comment.