Skip to content

Commit 03c800b

Browse files
authored
Merge pull request #1264 from Mihir7027/fix/batch-manifest-byte-limit-message
fix(cli): use human-readable unit in batch manifest size error
2 parents e6e736a + d7f79ea commit 03c800b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ def _load_batch_manifest(raw_path: str) -> tuple[str, list[dict[str, Any]]]:
815815
payload = manifest_file.read(_BATCH_FILE_MAX_BYTES + 1)
816816
if len(payload) > _BATCH_FILE_MAX_BYTES:
817817
raise ValueError(
818-
f"batch manifest exceeds the {_BATCH_FILE_MAX_BYTES}-byte limit"
818+
f"batch manifest exceeds the 1 MiB limit"
819819
)
820820

821821
try:

test/services/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ def test_batch_manifest_limits_size_and_task_count(self):
990990
with tempfile.TemporaryDirectory() as temp_dir:
991991
oversized = Path(temp_dir) / "oversized.jsonl"
992992
oversized.write_bytes(b"x" * (cli._BATCH_FILE_MAX_BYTES + 1))
993-
with self.assertRaisesRegex(ValueError, "byte limit"):
993+
with self.assertRaisesRegex(ValueError, "1 MiB limit"):
994994
cli._load_batch_manifest(str(oversized))
995995

996996
too_many = Path(temp_dir) / "too-many.json"

0 commit comments

Comments
 (0)