Florent Gbelidji commited on
Sync DeepSeek OCR HF job code
Browse files- ds_batch_ocr/hf_io.py +5 -2
ds_batch_ocr/hf_io.py
CHANGED
|
@@ -72,7 +72,8 @@ def resolve_stage_dir(base_dir: Path, locator: ArtifactLocator) -> Path:
|
|
| 72 |
|
| 73 |
manifest_path = locate_manifest(base_dir)
|
| 74 |
if manifest_path:
|
| 75 |
-
|
|
|
|
| 76 |
|
| 77 |
strategy = (locator.strategy or "local").lower()
|
| 78 |
if strategy == "local":
|
|
@@ -87,11 +88,13 @@ def resolve_stage_dir(base_dir: Path, locator: ArtifactLocator) -> Path:
|
|
| 87 |
|
| 88 |
manifest_path = locate_manifest(base_dir)
|
| 89 |
if manifest_path:
|
| 90 |
-
|
|
|
|
| 91 |
|
| 92 |
outputs_dir = base_dir / "outputs"
|
| 93 |
outputs_manifest = locate_manifest(outputs_dir)
|
| 94 |
if outputs_manifest:
|
|
|
|
| 95 |
return outputs_manifest.parent
|
| 96 |
|
| 97 |
return base_dir
|
|
|
|
| 72 |
|
| 73 |
manifest_path = locate_manifest(base_dir)
|
| 74 |
if manifest_path:
|
| 75 |
+
locator.manifest_name = manifest_path.name
|
| 76 |
+
return manifest_path.parent
|
| 77 |
|
| 78 |
strategy = (locator.strategy or "local").lower()
|
| 79 |
if strategy == "local":
|
|
|
|
| 88 |
|
| 89 |
manifest_path = locate_manifest(base_dir)
|
| 90 |
if manifest_path:
|
| 91 |
+
locator.manifest_name = manifest_path.name
|
| 92 |
+
return manifest_path.parent
|
| 93 |
|
| 94 |
outputs_dir = base_dir / "outputs"
|
| 95 |
outputs_manifest = locate_manifest(outputs_dir)
|
| 96 |
if outputs_manifest:
|
| 97 |
+
locator.manifest_name = outputs_manifest.name
|
| 98 |
return outputs_manifest.parent
|
| 99 |
|
| 100 |
return base_dir
|