"src/git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "ad1cb5fc256b9ff1f3a2f008484a765fd8c139d4"
Unverified Commit 3ca1874c authored by Stas Bekman's avatar Stas Bekman Committed by GitHub
Browse files

[examples testing] restore code (#7099)

For some reason https://github.com/huggingface/transformers/pull/5512 re-added temp dir creation code that was removed by
https://github.com/huggingface/transformers/pull/6494 defeating the purpose of that PR for those tests.
parent 4d391484
...@@ -15,4 +15,4 @@ pandas ...@@ -15,4 +15,4 @@ pandas
datasets datasets
fire fire
pytest pytest
conllu conllu
\ No newline at end of file
...@@ -80,10 +80,7 @@ class ExamplesTests(TestCasePlus): ...@@ -80,10 +80,7 @@ class ExamplesTests(TestCasePlus):
--warmup_steps=2 --warmup_steps=2
--seed=42 --seed=42
--max_seq_length=128 --max_seq_length=128
""" """.split()
output_dir = "./tests/fixtures/tests_samples/temp_dir_{}".format(hash(testargs))
testargs += "--output_dir " + output_dir
testargs = testargs.split()
if is_cuda_and_apex_available(): if is_cuda_and_apex_available():
testargs.append("--fp16") testargs.append("--fp16")
...@@ -149,10 +146,7 @@ class ExamplesTests(TestCasePlus): ...@@ -149,10 +146,7 @@ class ExamplesTests(TestCasePlus):
--do_train --do_train
--do_eval --do_eval
--num_train_epochs=1 --num_train_epochs=1
""" """.split()
output_dir = "./tests/fixtures/tests_samples/temp_dir_{}".format(hash(testargs))
testargs += "--output_dir " + output_dir
testargs = testargs.split()
if torch_device != "cuda": if torch_device != "cuda":
testargs.append("--no_cuda") testargs.append("--no_cuda")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment