Skip to content

Commit c229883

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d70ec13 commit c229883

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/test_sharded_runs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,17 @@ def build_command(run_path: Path, dataset_path: Path, **overrides) -> list[str]:
216216

217217
def run_checked(cmd: list[str]) -> str:
218218
result = subprocess.run(cmd, capture_output=True, text=True)
219-
assert result.returncode == 0, f"{' '.join(cmd)} failed:\n{result.stdout}\n{result.stderr}"
219+
assert (
220+
result.returncode == 0
221+
), f"{' '.join(cmd)} failed:\n{result.stdout}\n{result.stderr}"
220222
return result.stdout + result.stderr
221223

222224

223225
@pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA not available")
224226
def test_sharded_build_lifecycle(tmp_path: Path):
225-
texts = [f"The number {i} comes before the number {i + 1}." for i in range(NUM_EXAMPLES)]
227+
texts = [
228+
f"The number {i} comes before the number {i + 1}." for i in range(NUM_EXAMPLES)
229+
]
226230
dataset_path = tmp_path / "data"
227231
Dataset.from_dict({"text": texts}).save_to_disk(str(dataset_path))
228232

0 commit comments

Comments
 (0)