repo2rlenv-swe-next / tasks /swe-next-5a0e26bb0159a67bbbc0 /environment /source /benchmarks /requirement.py
Download tasks/swe-next-5a0e26bb0159a67bbbc0/environment/source/benchmarks/requirement.py from FineEnvs/repo2rlenv-swe-next: direct link, hf CLI and curl.
- Browser
- Download file 515 Bytes
-
https://huggingface.co/datasets/FineEnvs/repo2rlenv-swe-next/resolve/a6b1edf56ccadb722f34c40dde05944517fc7efe/tasks/swe-next-5a0e26bb0159a67bbbc0/environment/source/benchmarks/requirement.py
- Command line
-
hf download hf://datasets/FineEnvs/repo2rlenv-swe-next@a6b1edf56ccadb722f34c40dde05944517fc7efe/tasks/swe-next-5a0e26bb0159a67bbbc0/environment/source/benchmarks/requirement.py
-
curl -L -o requirement.py https://huggingface.co/datasets/FineEnvs/repo2rlenv-swe-next/resolve/a6b1edf56ccadb722f34c40dde05944517fc7efe/tasks/swe-next-5a0e26bb0159a67bbbc0/environment/source/benchmarks/requirement.py
515 Bytes
| from __future__ import annotations | |
| from pathlib import Path | |
| from packaging.requirements import Requirement | |
| from . import add_attributes | |
| DIR = Path(__file__).parent.resolve() | |
| class TimeRequirementSuite: | |
| rounds = 4 | |
| def setup(self) -> None: | |
| with (DIR / "dist_sample.txt").open() as f: | |
| self.req_strs = [r.strip() for r in f] | |
| def time_constructor(self) -> None: | |
| for r in self.req_strs: | |
| Requirement(r) | |