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

CI parity test is broken due to FileNotFoundError #632

Open
albertvillanova opened this issue Sep 12, 2024 · 0 comments
Open

CI parity test is broken due to FileNotFoundError #632

albertvillanova opened this issue Sep 12, 2024 · 0 comments
Assignees

Comments

@albertvillanova
Copy link
Member

albertvillanova commented Sep 12, 2024

CI parity test is broken due to FileNotFoundError: https://github.com/huggingface/evaluate/actions/runs/10827111652/job/30039577026?pr=631

FAILED tests/test_trainer_evaluator_parity.py::TestEvaluatorTrainerParity::test_token_classification_parity - FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpg8va97zxevaluator_trainer_parity_test/tokenclassification_conll2003_transformers/eval_results.json'
_________ TestEvaluatorTrainerParity.test_token_classification_parity __________
[gw0] linux -- Python 3.8.18 /opt/hostedtoolcache/Python/3.8.18/x64/bin/python

self = <tests.test_trainer_evaluator_parity.TestEvaluatorTrainerParity testMethod=test_token_classification_parity>

    def test_token_classification_parity(self):
        model_name = "hf-internal-testing/tiny-bert-for-token-classification"
        n_samples = 500
    
        subprocess.run(
            "git sparse-checkout set examples/pytorch/token-classification",
            shell=True,
            cwd=os.path.join(self.dir_path, "transformers"),
        )
    
        subprocess.run(
            f"python examples/pytorch/token-classification/run_ner.py"
            f" --model_name_or_path {model_name}"
            f" --dataset_name conll2003"
            f" --do_eval"
            f" --output_dir {os.path.join(self.dir_path, 'tokenclassification_conll2003_transformers')}"
            f" --max_eval_samples {n_samples}",
            shell=True,
            cwd=os.path.join(self.dir_path, "transformers"),
        )
    
>       with open(
            os.path.join(self.dir_path, "tokenclassification_conll2003_transformers", "eval_results.json"), "r"
        ) as f:
E       FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpg8va97zxevaluator_trainer_parity_test/tokenclassification_conll2003_transformers/eval_results.json'

tests/test_trainer_evaluator_parity.py:293: FileNotFoundError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant