anyscale 0.26.7__py3-none-any.whl → 0.26.9__py3-none-any.whl
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.
- anyscale/_private/anyscale_client/anyscale_client.py +17 -1
- anyscale/_private/anyscale_client/common.py +12 -2
- anyscale/_private/anyscale_client/fake_anyscale_client.py +20 -3
- anyscale/_private/docgen/__main__.py +4 -0
- anyscale/_private/docgen/models.md +11 -2
- anyscale/client/README.md +7 -23
- anyscale/client/openapi_client/__init__.py +5 -15
- anyscale/client/openapi_client/api/default_api.py +410 -1091
- anyscale/client/openapi_client/models/__init__.py +5 -15
- anyscale/client/openapi_client/models/baseimagesenum.py +135 -1
- anyscale/client/openapi_client/models/{jobslogs_response.py → cluster_state.py} +21 -34
- anyscale/client/openapi_client/models/describe_system_workload_response.py +226 -0
- anyscale/client/openapi_client/models/{interactivesessionlogs_response.py → describesystemworkloadresponse_response.py} +11 -11
- anyscale/client/openapi_client/models/job_details.py +27 -1
- anyscale/client/openapi_client/models/metric.py +29 -3
- anyscale/client/openapi_client/models/{timestampedlogsoutput_response.py → operator_metric_id.py} +49 -22
- anyscale/client/openapi_client/models/operator_metrics.py +83 -3
- anyscale/client/openapi_client/models/supportedbaseimagesenum.py +135 -1
- anyscale/client/openapi_client/models/{job_submissions_sort_field.py → system_workload_name.py} +6 -8
- anyscale/commands/command_examples.py +4 -0
- anyscale/commands/service_commands.py +62 -27
- anyscale/job/_private/job_sdk.py +1 -3
- anyscale/sdk/anyscale_client/__init__.py +1 -0
- anyscale/sdk/anyscale_client/models/__init__.py +1 -0
- anyscale/sdk/anyscale_client/models/baseimagesenum.py +135 -1
- anyscale/sdk/anyscale_client/models/cluster.py +60 -3
- anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +135 -1
- anyscale/{client/openapi_client/models/job_status.py → sdk/anyscale_client/models/system_workload_name.py} +8 -14
- anyscale/service/__init__.py +19 -0
- anyscale/service/_private/service_sdk.py +26 -2
- anyscale/service/commands.py +48 -9
- anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
- anyscale/version.py +1 -1
- {anyscale-0.26.7.dist-info → anyscale-0.26.9.dist-info}/METADATA +1 -1
- {anyscale-0.26.7.dist-info → anyscale-0.26.9.dist-info}/RECORD +40 -49
- anyscale/client/openapi_client/models/decorated_job_submission.py +0 -547
- anyscale/client/openapi_client/models/decoratedjobsubmission_list_response.py +0 -147
- anyscale/client/openapi_client/models/decoratedjobsubmission_response.py +0 -121
- anyscale/client/openapi_client/models/interactive_session_logs.py +0 -152
- anyscale/client/openapi_client/models/jobs_logs.py +0 -152
- anyscale/client/openapi_client/models/jobs_logs_query_info.py +0 -181
- anyscale/client/openapi_client/models/jobslogsqueryinfo_response.py +0 -121
- anyscale/client/openapi_client/models/serve_deployment_logs.py +0 -152
- anyscale/client/openapi_client/models/servedeploymentlogs_response.py +0 -121
- anyscale/client/openapi_client/models/timestamped_logs_output.py +0 -148
- {anyscale-0.26.7.dist-info → anyscale-0.26.9.dist-info}/LICENSE +0 -0
- {anyscale-0.26.7.dist-info → anyscale-0.26.9.dist-info}/NOTICE +0 -0
- {anyscale-0.26.7.dist-info → anyscale-0.26.9.dist-info}/WHEEL +0 -0
- {anyscale-0.26.7.dist-info → anyscale-0.26.9.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.7.dist-info → anyscale-0.26.9.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
from io import StringIO
|
2
2
|
from json import dumps as json_dumps
|
3
3
|
import pathlib
|
4
|
+
import sys
|
4
5
|
from typing import Any, Dict, Optional, Tuple
|
5
6
|
|
6
7
|
import click
|
@@ -171,7 +172,7 @@ def _read_name_from_config_file(path: str):
|
|
171
172
|
required=False,
|
172
173
|
default=None,
|
173
174
|
type=str,
|
174
|
-
help="The Anyscale Cloud
|
175
|
+
help="The Anyscale Cloud of this workload. If not provided, the organization default will be used (or, if running in a workspace, the cloud of the workspace).",
|
175
176
|
)
|
176
177
|
@click.option(
|
177
178
|
"--project",
|
@@ -334,7 +335,7 @@ def deploy( # noqa: PLR0912, PLR0913 C901
|
|
334
335
|
required=False,
|
335
336
|
default=None,
|
336
337
|
type=str,
|
337
|
-
help="The Anyscale Cloud
|
338
|
+
help="The Anyscale Cloud of this workload. If not provided, the organization default will be used (or, if running in a workspace, the cloud of the workspace).",
|
338
339
|
)
|
339
340
|
@click.option(
|
340
341
|
"--project",
|
@@ -415,7 +416,7 @@ def status(
|
|
415
416
|
required=False,
|
416
417
|
default=None,
|
417
418
|
type=str,
|
418
|
-
help="The Anyscale Cloud
|
419
|
+
help="The Anyscale Cloud of this workload. If not provided, the organization default will be used (or, if running in a workspace, the cloud of the workspace).",
|
419
420
|
)
|
420
421
|
@click.option(
|
421
422
|
"--project",
|
@@ -481,7 +482,7 @@ def wait(
|
|
481
482
|
required=False,
|
482
483
|
default=None,
|
483
484
|
type=str,
|
484
|
-
help="The Anyscale Cloud
|
485
|
+
help="The Anyscale Cloud of this workload. If not provided, the organization default will be used (or, if running in a workspace, the cloud of the workspace).",
|
485
486
|
)
|
486
487
|
@click.option(
|
487
488
|
"--project",
|
@@ -746,23 +747,64 @@ def terminate(
|
|
746
747
|
cls=AnyscaleCommand,
|
747
748
|
example=command_examples.SERVICE_ARCHIVE_EXAMPLE,
|
748
749
|
)
|
750
|
+
@click.option(
|
751
|
+
"--service-id", "--id", required=False, help="ID of service.",
|
752
|
+
)
|
749
753
|
@click.option(
|
750
754
|
"-n", "--name", required=False, default=None, type=str, help="Name of the service.",
|
751
755
|
)
|
752
756
|
@click.option(
|
753
|
-
"
|
754
|
-
"--config-file",
|
757
|
+
"--cloud",
|
755
758
|
required=False,
|
756
759
|
default=None,
|
757
760
|
type=str,
|
758
|
-
help="
|
761
|
+
help="The Anyscale Cloud of this workload. If not provided, the organization default will be used.",
|
762
|
+
)
|
763
|
+
@click.option(
|
764
|
+
"--project",
|
765
|
+
required=False,
|
766
|
+
default=None,
|
767
|
+
type=str,
|
768
|
+
help="Named project to use for the service. If not provided, the default project for the cloud will be used (or, if running in a workspace, the project of the workspace).",
|
769
|
+
)
|
770
|
+
def archive(
|
771
|
+
service_id: Optional[str],
|
772
|
+
name: Optional[str],
|
773
|
+
cloud: Optional[str],
|
774
|
+
project: Optional[str],
|
775
|
+
) -> None:
|
776
|
+
"""Archive a service."""
|
777
|
+
|
778
|
+
if (service_id and name) or (not service_id and not name):
|
779
|
+
log.error("Exactly one of '--id/--service-id' or '--name' must be provided.")
|
780
|
+
sys.exit(1)
|
781
|
+
|
782
|
+
identifier = name if name else service_id
|
783
|
+
try:
|
784
|
+
anyscale.service.archive(id=service_id, name=name, cloud=cloud, project=project)
|
785
|
+
log.info(f"Successfully archived service: {identifier}")
|
786
|
+
except Exception as e: # noqa: BLE001
|
787
|
+
log.error(f"Error archiving service: {e}")
|
788
|
+
|
789
|
+
|
790
|
+
@service_cli.command(
|
791
|
+
name="delete",
|
792
|
+
help="Delete a service.",
|
793
|
+
cls=AnyscaleCommand,
|
794
|
+
example=command_examples.SERVICE_DELETE_EXAMPLE,
|
795
|
+
)
|
796
|
+
@click.option(
|
797
|
+
"--service-id", "--id", required=False, help="ID of service.",
|
798
|
+
)
|
799
|
+
@click.option(
|
800
|
+
"-n", "--name", required=False, default=None, type=str, help="Name of the service.",
|
759
801
|
)
|
760
802
|
@click.option(
|
761
803
|
"--cloud",
|
762
804
|
required=False,
|
763
805
|
default=None,
|
764
806
|
type=str,
|
765
|
-
help="The Anyscale Cloud
|
807
|
+
help="The Anyscale Cloud of this workload. If not provided, the organization default will be used.",
|
766
808
|
)
|
767
809
|
@click.option(
|
768
810
|
"--project",
|
@@ -771,28 +813,21 @@ def terminate(
|
|
771
813
|
type=str,
|
772
814
|
help="Named project to use for the service. If not provided, the default project for the cloud will be used (or, if running in a workspace, the project of the workspace).",
|
773
815
|
)
|
774
|
-
def
|
816
|
+
def delete(
|
817
|
+
service_id: Optional[str],
|
775
818
|
name: Optional[str],
|
776
|
-
config_file: Optional[str],
|
777
819
|
cloud: Optional[str],
|
778
820
|
project: Optional[str],
|
779
821
|
) -> None:
|
780
|
-
"""
|
822
|
+
"""Delete a service"""
|
781
823
|
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
if name is not None and config_file is not None:
|
786
|
-
raise click.ClickException(
|
787
|
-
"Only one of '--name' and '--config-file' can be provided."
|
788
|
-
)
|
789
|
-
|
790
|
-
if config_file is not None:
|
791
|
-
name = _read_name_from_config_file(config_file)
|
824
|
+
if (service_id and name) or (not service_id and not name):
|
825
|
+
log.error("Exactly one of '--id/--service-id' or '--name' must be provided.")
|
826
|
+
sys.exit(1)
|
792
827
|
|
793
|
-
if name
|
794
|
-
|
795
|
-
|
796
|
-
)
|
797
|
-
|
798
|
-
|
828
|
+
identifier = name if name else service_id
|
829
|
+
try:
|
830
|
+
anyscale.service.delete(id=service_id, name=name, cloud=cloud, project=project)
|
831
|
+
log.info(f"Successfully deleted service: {identifier}")
|
832
|
+
except Exception as e: # noqa: BLE001
|
833
|
+
log.error(f"Error deleting service: {e}")
|
anyscale/job/_private/job_sdk.py
CHANGED
@@ -12,9 +12,6 @@ from anyscale.client.openapi_client.models.create_job_queue_config import (
|
|
12
12
|
CreateJobQueueConfig,
|
13
13
|
)
|
14
14
|
from anyscale.client.openapi_client.models.job_queue_spec import JobQueueSpec
|
15
|
-
from anyscale.client.openapi_client.models.job_status import (
|
16
|
-
JobStatus as BackendJobStatus,
|
17
|
-
)
|
18
15
|
from anyscale.client.openapi_client.models.production_job import ProductionJob
|
19
16
|
from anyscale.client.openapi_client.models.ray_runtime_env_config import (
|
20
17
|
RayRuntimeEnvConfig,
|
@@ -30,6 +27,7 @@ from anyscale.job.models import (
|
|
30
27
|
)
|
31
28
|
from anyscale.sdk.anyscale_client.models import Job
|
32
29
|
from anyscale.sdk.anyscale_client.models.ha_job_states import HaJobStates
|
30
|
+
from anyscale.sdk.anyscale_client.models.job_status import JobStatus as BackendJobStatus
|
33
31
|
from anyscale.utils.runtime_env import parse_requirements_file
|
34
32
|
|
35
33
|
|
@@ -203,6 +203,7 @@ from anyscale_client.models.ssoconfig_response import SsoconfigResponse
|
|
203
203
|
from anyscale_client.models.start_cluster_options import StartClusterOptions
|
204
204
|
from anyscale_client.models.start_session_options import StartSessionOptions
|
205
205
|
from anyscale_client.models.static_sso_config import StaticSSOConfig
|
206
|
+
from anyscale_client.models.system_workload_name import SystemWorkloadName
|
206
207
|
from anyscale_client.models.terminate_cluster_options import TerminateClusterOptions
|
207
208
|
from anyscale_client.models.terminate_session_options import TerminateSessionOptions
|
208
209
|
from anyscale_client.models.text_query import TextQuery
|
@@ -189,6 +189,7 @@ from anyscale_client.models.ssoconfig_response import SsoconfigResponse
|
|
189
189
|
from anyscale_client.models.start_cluster_options import StartClusterOptions
|
190
190
|
from anyscale_client.models.start_session_options import StartSessionOptions
|
191
191
|
from anyscale_client.models.static_sso_config import StaticSSOConfig
|
192
|
+
from anyscale_client.models.system_workload_name import SystemWorkloadName
|
192
193
|
from anyscale_client.models.terminate_cluster_options import TerminateClusterOptions
|
193
194
|
from anyscale_client.models.terminate_session_options import TerminateSessionOptions
|
194
195
|
from anyscale_client.models.text_query import TextQuery
|