File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/mettagrid/python/src/mettagrid/policy Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -186,9 +186,19 @@ def load_policy_spec_from_s3(
186186 * ,
187187 device : str | None = None ,
188188) -> PolicySpec :
189- """Download a submission archive or checkpoint dir from S3 into cache and return a PolicySpec.
189+ """Download a submission archive or checkpoint dir from S3 and return a PolicySpec ready for loading .
190190
191- Caches by URI hash; applies device override when provided.
191+ Downloads into a deterministic cache location based on the URI hash, allowing
192+ reuse across calls with the same URI.
193+
194+ Args:
195+ s3_path: S3 path to a submission archive (.zip) or checkpoint directory
196+ cache_dir: Base directory for caching. Defaults to /tmp/mettagrid-policy-cache
197+ remove_downloaded_copy_on_exit: If True, register an atexit handler to clean up the cache directory
198+ device: Override the device in the loaded spec (e.g., "cpu" or "cuda:0")
199+
200+ Returns:
201+ PolicySpec with paths resolved to the local extraction directory
192202 """
193203 if cache_dir is None :
194204 cache_dir = DEFAULT_POLICY_CACHE_DIR
You can’t perform that action at this time.
0 commit comments