instance-repo 1.0.9.dev5__tar.gz → 1.0.9.dev6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/PKG-INFO +1 -1
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/__init__.py +1 -1
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/instances.py +46 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/versions.py +6 -3
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo.egg-info/PKG-INFO +1 -1
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/pyproject.toml +1 -1
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/README.md +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/_routing.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/_site_defaults.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/bootstrap.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/cache.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/cli.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/__init__.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/benchmarks.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/config.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/datasets.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/images.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/reports.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/scaffold.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/splits.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/clients/workflows.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/concurrency.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/content.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/endpoints.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/errors.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/image.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/layout.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/loader.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/models.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/paths.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/release.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/repo.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/retry.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/store/__init__.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/store/acr.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/store/base.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/store/oss.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/store/registry.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/tasktoml.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/transport.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo/validate.py +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo.egg-info/SOURCES.txt +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo.egg-info/dependency_links.txt +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo.egg-info/entry_points.txt +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo.egg-info/requires.txt +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo.egg-info/top_level.txt +0 -0
- {instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/setup.cfg +0 -0
|
@@ -714,6 +714,52 @@ class InstancesClient:
|
|
|
714
714
|
return self._content.get(dataset, version, instance_id, split, dest,
|
|
715
715
|
expected_digest=expected, layout=lay)
|
|
716
716
|
|
|
717
|
+
def pull_many(self, instance_ids: list[str], dataset: str, version: str,
|
|
718
|
+
dest_dir, *, split: str = "default",
|
|
719
|
+
concurrency: int = 8, continue_on_error: bool = False,
|
|
720
|
+
verify: bool = True) -> list[Path]:
|
|
721
|
+
"""Batch-download instances concurrently (parallel counterpart of :meth:`pull`).
|
|
722
|
+
|
|
723
|
+
Uses :func:`map_concurrent` to download up to *concurrency* instances in
|
|
724
|
+
parallel. Results preserve input order.
|
|
725
|
+
|
|
726
|
+
Parameters
|
|
727
|
+
----------
|
|
728
|
+
instance_ids:
|
|
729
|
+
Instance IDs to download.
|
|
730
|
+
dataset, version, split:
|
|
731
|
+
Dataset coordinates (same semantics as :meth:`pull`).
|
|
732
|
+
dest_dir:
|
|
733
|
+
Root directory under which each instance is materialised.
|
|
734
|
+
concurrency:
|
|
735
|
+
Maximum number of parallel downloads (default 8).
|
|
736
|
+
continue_on_error:
|
|
737
|
+
``False`` (default) — first failure raises ``ItemError`` (all-or-nothing).
|
|
738
|
+
``True`` — failures are captured as ``ItemError`` placeholders in the
|
|
739
|
+
returned list; successful entries contain the downloaded :class:`Path`.
|
|
740
|
+
verify:
|
|
741
|
+
When ``True`` (default), validate content digest against registry
|
|
742
|
+
metadata (see :meth:`pull`).
|
|
743
|
+
|
|
744
|
+
Returns
|
|
745
|
+
-------
|
|
746
|
+
list[Path]
|
|
747
|
+
Downloaded paths in the same order as *instance_ids*.
|
|
748
|
+
When *continue_on_error* is ``True``, failed entries are
|
|
749
|
+
``ItemError`` instances instead of paths.
|
|
750
|
+
"""
|
|
751
|
+
ids = list(instance_ids)
|
|
752
|
+
if not ids:
|
|
753
|
+
return []
|
|
754
|
+
dest = Path(dest_dir)
|
|
755
|
+
|
|
756
|
+
def _one(iid):
|
|
757
|
+
return self.pull(dataset, version, iid, dest,
|
|
758
|
+
split=split, verify=verify)
|
|
759
|
+
|
|
760
|
+
return map_concurrent(_one, ids, concurrency=concurrency,
|
|
761
|
+
return_exceptions=continue_on_error)
|
|
762
|
+
|
|
717
763
|
|
|
718
764
|
def _tags(metadata: dict) -> dict:
|
|
719
765
|
t = metadata.get("tags", {})
|
|
@@ -376,10 +376,13 @@ class VersionsClient:
|
|
|
376
376
|
"storage_type": storage_type, "status": status}
|
|
377
377
|
if splits:
|
|
378
378
|
body["splits"] = splits
|
|
379
|
+
# environment 必须放 query(apiserver createVersionRequest 无该字段,
|
|
380
|
+
# 只从 datasetEnvironmentFromQuery 读);放 body 会被静默丢弃导致
|
|
381
|
+
# 版本落到默认 online 而 list/get/update 走 profile 派生的 pre。
|
|
382
|
+
q = f"dataset_name={quote(dataset, safe='')}"
|
|
379
383
|
if env:
|
|
380
|
-
|
|
381
|
-
data = self._t.post(
|
|
382
|
-
f"{self._BASE}?dataset_name={quote(dataset, safe='')}", body)
|
|
384
|
+
q += f"&environment={quote(env, safe='')}"
|
|
385
|
+
data = self._t.post(f"{self._BASE}?{q}", body)
|
|
383
386
|
return DatasetVersion(**_pick(data))
|
|
384
387
|
|
|
385
388
|
def update(self, dataset: str, version: str, *, status: str | None = None,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{instance_repo-1.0.9.dev5 → instance_repo-1.0.9.dev6}/instance_repo.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|