coiled 1.93.3.dev15__tar.gz → 1.94.1__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.
- {coiled-1.93.3.dev15 → coiled-1.94.1}/PKG-INFO +1 -1
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/batch.py +2 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/batch/run.py +12 -1
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/notebook/notebook.py +1 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/v2/cluster.py +14 -1
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/v2/core.py +18 -2
- {coiled-1.93.3.dev15 → coiled-1.94.1}/.gitignore +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/LICENSE +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/README.md +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/__main__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/analytics.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/auth.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/capture_environment.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/batch/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/batch/list.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/batch/status.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/batch/wait.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/cluster/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/cluster/azure_logs.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/cluster/better_logs.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/cluster/crud.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/cluster/get_address.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/cluster/list.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/cluster/logs.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/cluster/metrics.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/cluster/ssh.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/cluster/utils.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/config.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/core.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/curl.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/diagnostics.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/env.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/examples/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/examples/exit.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/examples/hello_world.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/examples/nyc_parquet.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/examples/pytorch.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/examples/xarray_nwm.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/hello.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/scripts/fill_ipython.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/scripts/nyc_parquet.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/scripts/pytorch.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/scripts/xarray_nwm.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/hello/utils.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/login.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/notebook/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/package_sync.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/prefect.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/prefect_serve.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/run.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/setup/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/setup/amp.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/setup/aws.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/setup/azure.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/setup/entry.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/setup/gcp.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/setup/prometheus.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/setup/util.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/sync.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cli/utils.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/cluster.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/coiled.yaml +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/compatibility.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/config.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/context.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/core.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/credentials/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/credentials/aws.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/credentials/google.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/errors.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/exceptions.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/extensions/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/extensions/prefect/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/extensions/prefect/runners.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/extensions/prefect/workers.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/function.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/plugins.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/prefect.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/pypi_conda_map.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/scan.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/software.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/software_utils.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/spans.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/spark.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/types.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/utils.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/v2/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/v2/cwi_log_link.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/v2/states.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/v2/widgets/__init__.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/v2/widgets/interface.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/v2/widgets/rich.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/v2/widgets/util.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/coiled/websockets.py +0 -0
- {coiled-1.93.3.dev15 → coiled-1.94.1}/pyproject.toml +0 -0
|
@@ -40,6 +40,7 @@ def run(
|
|
|
40
40
|
package_sync_strict: bool = False,
|
|
41
41
|
package_sync_conda_extras: list | None = None,
|
|
42
42
|
host_setup_script: str | None = None,
|
|
43
|
+
ignore_container_entrypoint: bool | None = None,
|
|
43
44
|
logger=None,
|
|
44
45
|
) -> dict:
|
|
45
46
|
"""Submit a batch job to run on Coiled.
|
|
@@ -83,6 +84,7 @@ def run(
|
|
|
83
84
|
package_sync_strict=package_sync_strict,
|
|
84
85
|
package_sync_conda_extras=package_sync_conda_extras,
|
|
85
86
|
host_setup_script=host_setup_script,
|
|
87
|
+
ignore_container_entrypoint=ignore_container_entrypoint,
|
|
86
88
|
logger=logger,
|
|
87
89
|
)
|
|
88
90
|
|
|
@@ -160,6 +160,15 @@ def get_kwargs_from_header(f: dict, click_params: list):
|
|
|
160
160
|
"only what your task needs in order to run."
|
|
161
161
|
),
|
|
162
162
|
)
|
|
163
|
+
@click.option(
|
|
164
|
+
"--ignore-container-entrypoint",
|
|
165
|
+
default=None,
|
|
166
|
+
help=(
|
|
167
|
+
"Ignore entrypoint for specified Docker container "
|
|
168
|
+
"(like ``docker run --entrypoint``); "
|
|
169
|
+
"default is to use the entrypoint (if any) set on the image."
|
|
170
|
+
),
|
|
171
|
+
)
|
|
163
172
|
@click.option(
|
|
164
173
|
"--env",
|
|
165
174
|
"-e",
|
|
@@ -499,6 +508,8 @@ def _batch_run(default_kwargs, logger=None, from_cli=False, **kwargs) -> dict:
|
|
|
499
508
|
f"You can specify single value like '16GB', or a range like '16GB-32GB'."
|
|
500
509
|
) from e
|
|
501
510
|
|
|
511
|
+
batch_job_container = f"{kwargs['container']}!" if kwargs["ignore_container_entrypoint"] else kwargs["container"]
|
|
512
|
+
|
|
502
513
|
cluster_kwargs = {
|
|
503
514
|
"name": kwargs["name"],
|
|
504
515
|
"workspace": kwargs["workspace"],
|
|
@@ -507,7 +518,7 @@ def _batch_run(default_kwargs, logger=None, from_cli=False, **kwargs) -> dict:
|
|
|
507
518
|
"show_widget": True,
|
|
508
519
|
# batch job can either run in normal Coiled software env (which defaults to package sync)
|
|
509
520
|
# or can run in an extra container (which doesn't need to include dask)
|
|
510
|
-
"batch_job_container":
|
|
521
|
+
"batch_job_container": batch_job_container,
|
|
511
522
|
# if batch job is running in extra container, then we just need a pretty minimal dask container
|
|
512
523
|
# so for now switch the default in that case to basic dask container
|
|
513
524
|
# TODO would it be better to use a pre-built senv with our `cloud-env-run` container instead?
|
|
@@ -203,6 +203,7 @@ class ClusterKwargs(TypedDict, total=False):
|
|
|
203
203
|
host_setup_script: str | None
|
|
204
204
|
region: str | None
|
|
205
205
|
arm: bool | None
|
|
206
|
+
pause_on_exit: bool | None
|
|
206
207
|
|
|
207
208
|
|
|
208
209
|
class Cluster(DistributedCluster, Generic[IsAsynchronous]):
|
|
@@ -449,6 +450,8 @@ class Cluster(DistributedCluster, Generic[IsAsynchronous]):
|
|
|
449
450
|
The cloud provider region in which to run the cluster.
|
|
450
451
|
arm
|
|
451
452
|
Use ARM instances for cluster; default is x86 (Intel) instances.
|
|
453
|
+
pause_on_exit
|
|
454
|
+
Pause the cluster instead of shutting it down when exiting.
|
|
452
455
|
"""
|
|
453
456
|
|
|
454
457
|
_instances = weakref.WeakSet()
|
|
@@ -527,6 +530,7 @@ class Cluster(DistributedCluster, Generic[IsAsynchronous]):
|
|
|
527
530
|
arm: bool | None = None,
|
|
528
531
|
batch_job_ids: List[int] | None = None,
|
|
529
532
|
batch_job_container: str | None = None,
|
|
533
|
+
pause_on_exit: bool | None = None,
|
|
530
534
|
):
|
|
531
535
|
self._cluster_event_queue = []
|
|
532
536
|
|
|
@@ -711,7 +715,15 @@ class Cluster(DistributedCluster, Generic[IsAsynchronous]):
|
|
|
711
715
|
self._worker_on_scheduler_name = None
|
|
712
716
|
self.n_worker_specs_per_host = _n_worker_specs_per_host
|
|
713
717
|
self.batch_job_ids = batch_job_ids
|
|
714
|
-
|
|
718
|
+
|
|
719
|
+
# somewhat internal API since batch kwargs shouldn't be used directly by user but are for batch API:
|
|
720
|
+
# "!" at end of container URI means "ignore entrypoint"
|
|
721
|
+
if batch_job_container and batch_job_container[-1] == "!":
|
|
722
|
+
self.extra_user_container = batch_job_container.rstrip("!")
|
|
723
|
+
self.extra_user_container_ignore_entrypoint = True
|
|
724
|
+
else:
|
|
725
|
+
self.extra_user_container = batch_job_container
|
|
726
|
+
self.extra_user_container_ignore_entrypoint = False
|
|
715
727
|
|
|
716
728
|
self.software_environment = software or dask.config.get("coiled.software")
|
|
717
729
|
self.software_container = container
|
|
@@ -1540,6 +1552,7 @@ class Cluster(DistributedCluster, Generic[IsAsynchronous]):
|
|
|
1540
1552
|
custom_subdomain=self.dashboard_custom_subdomain,
|
|
1541
1553
|
batch_job_ids=self.batch_job_ids,
|
|
1542
1554
|
extra_user_container=self.extra_user_container,
|
|
1555
|
+
extra_user_container_ignore_entrypoint=self.extra_user_container_ignore_entrypoint,
|
|
1543
1556
|
host_setup_script_content=self.host_setup_script_content,
|
|
1544
1557
|
)
|
|
1545
1558
|
cluster_created = not cluster_existed
|
|
@@ -617,7 +617,9 @@ class CloudV2(OldCloud, Generic[IsAsynchronous]):
|
|
|
617
617
|
custom_subdomain: str | None = None,
|
|
618
618
|
batch_job_ids: List[int] | None = None,
|
|
619
619
|
extra_user_container: str | None = None,
|
|
620
|
+
extra_user_container_ignore_entrypoint: bool | None = None,
|
|
620
621
|
host_setup_script_content: str | None = None,
|
|
622
|
+
pause_on_exit: bool | None = None,
|
|
621
623
|
) -> Tuple[int, bool]:
|
|
622
624
|
# TODO (Declarative): support these args, or decide not to
|
|
623
625
|
# https://gitlab.com/coiled/cloud/-/issues/4305
|
|
@@ -650,7 +652,9 @@ class CloudV2(OldCloud, Generic[IsAsynchronous]):
|
|
|
650
652
|
"custom_subdomain": custom_subdomain,
|
|
651
653
|
"batch_job_ids": batch_job_ids,
|
|
652
654
|
"extra_user_container": extra_user_container,
|
|
655
|
+
"extra_user_container_ignore_entrypoint": extra_user_container_ignore_entrypoint,
|
|
653
656
|
"host_setup_script": host_setup_script_content,
|
|
657
|
+
"pause_on_exit": pause_on_exit,
|
|
654
658
|
}
|
|
655
659
|
|
|
656
660
|
backend_options = backend_options if backend_options else {}
|
|
@@ -1808,9 +1812,21 @@ def list_clusters(account=None, workspace=None, max_pages: int | None = None, ju
|
|
|
1808
1812
|
|
|
1809
1813
|
|
|
1810
1814
|
@delete_docstring
|
|
1811
|
-
def delete_cluster(
|
|
1815
|
+
def delete_cluster(
|
|
1816
|
+
name: str | None = None,
|
|
1817
|
+
cluster_id: int | None = None,
|
|
1818
|
+
account: str | None = None,
|
|
1819
|
+
workspace: str | None = None,
|
|
1820
|
+
pause: bool = False,
|
|
1821
|
+
):
|
|
1822
|
+
if name and cluster_id:
|
|
1823
|
+
raise ValueError("You specified both name and cluster_id, only one can be specified")
|
|
1824
|
+
if not name and not cluster_id:
|
|
1825
|
+
raise ValueError("You must specify either name or cluster_id")
|
|
1812
1826
|
with CloudV2() as cloud:
|
|
1813
|
-
|
|
1827
|
+
if not cluster_id:
|
|
1828
|
+
assert name # too hard for pyright to figure out that name is str if cluster_id is falsy
|
|
1829
|
+
cluster_id = cloud.get_cluster_by_name(name=name, workspace=workspace or account)
|
|
1814
1830
|
if cluster_id is not None:
|
|
1815
1831
|
return cloud.delete_cluster(cluster_id=cluster_id, workspace=workspace or account, pause=pause)
|
|
1816
1832
|
|
|
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
|
|
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
|
|
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
|