lightning-sdk 0.1.55__py3-none-any.whl → 0.1.56__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.
Files changed (53) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/ai_hub.py +22 -0
  3. lightning_sdk/api/ai_hub_api.py +21 -2
  4. lightning_sdk/api/deployment_api.py +4 -3
  5. lightning_sdk/api/job_api.py +5 -10
  6. lightning_sdk/api/mmt_api.py +1 -4
  7. lightning_sdk/api/studio_api.py +5 -7
  8. lightning_sdk/api/teamspace_api.py +7 -0
  9. lightning_sdk/api/utils.py +1 -27
  10. lightning_sdk/cli/configure.py +92 -0
  11. lightning_sdk/cli/connect.py +31 -0
  12. lightning_sdk/cli/delete.py +6 -4
  13. lightning_sdk/cli/download.py +1 -1
  14. lightning_sdk/cli/entrypoint.py +8 -1
  15. lightning_sdk/cli/generate.py +13 -36
  16. lightning_sdk/cli/inspect.py +4 -2
  17. lightning_sdk/cli/jobs_menu.py +2 -1
  18. lightning_sdk/cli/list.py +5 -10
  19. lightning_sdk/cli/mmts_menu.py +2 -1
  20. lightning_sdk/cli/run.py +3 -3
  21. lightning_sdk/cli/serve.py +1 -2
  22. lightning_sdk/cli/start.py +2 -2
  23. lightning_sdk/cli/stop.py +5 -3
  24. lightning_sdk/cli/studios_menu.py +24 -1
  25. lightning_sdk/cli/switch.py +2 -2
  26. lightning_sdk/cli/teamspace_menu.py +2 -1
  27. lightning_sdk/cli/upload.py +6 -4
  28. lightning_sdk/lightning_cloud/openapi/__init__.py +4 -0
  29. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +105 -0
  30. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +113 -0
  31. lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +7 -3
  32. lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py +1 -5
  33. lightning_sdk/lightning_cloud/openapi/models/__init__.py +4 -0
  34. lightning_sdk/lightning_cloud/openapi/models/id_reportrestarttimings_body.py +123 -0
  35. lightning_sdk/lightning_cloud/openapi/models/project_id_litregistry_body.py +2 -0
  36. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +27 -1
  37. lightning_sdk/lightning_cloud/openapi/models/v1_get_cluster_accelerator_demand_response.py +123 -0
  38. lightning_sdk/lightning_cloud/openapi/models/v1_job.py +27 -1
  39. lightning_sdk/lightning_cloud/openapi/models/v1_lit_registry_artifact.py +27 -1
  40. lightning_sdk/lightning_cloud/openapi/models/v1_lit_registry_project.py +8 -0
  41. lightning_sdk/lightning_cloud/openapi/models/v1_lit_repository.py +27 -1
  42. lightning_sdk/lightning_cloud/openapi/models/v1_report_restart_timings_response.py +97 -0
  43. lightning_sdk/lightning_cloud/openapi/models/v1_restart_timing.py +175 -0
  44. lightning_sdk/lightning_cloud/openapi/models/v1_validate_deployment_image_request.py +27 -1
  45. lightning_sdk/machine.py +59 -27
  46. lightning_sdk/studio.py +5 -1
  47. lightning_sdk/teamspace.py +25 -0
  48. {lightning_sdk-0.1.55.dist-info → lightning_sdk-0.1.56.dist-info}/METADATA +2 -1
  49. {lightning_sdk-0.1.55.dist-info → lightning_sdk-0.1.56.dist-info}/RECORD +53 -47
  50. {lightning_sdk-0.1.55.dist-info → lightning_sdk-0.1.56.dist-info}/LICENSE +0 -0
  51. {lightning_sdk-0.1.55.dist-info → lightning_sdk-0.1.56.dist-info}/WHEEL +0 -0
  52. {lightning_sdk-0.1.55.dist-info → lightning_sdk-0.1.56.dist-info}/entry_points.txt +0 -0
  53. {lightning_sdk-0.1.55.dist-info → lightning_sdk-0.1.56.dist-info}/top_level.txt +0 -0
lightning_sdk/cli/list.py CHANGED
@@ -40,8 +40,7 @@ class _List(_TeamspacesMenu):
40
40
  str(studio.cloud_account),
41
41
  )
42
42
 
43
- console = Console()
44
- console.print(table)
43
+ Console().print(table)
45
44
 
46
45
  def jobs(self, teamspace: Optional[str] = None) -> None:
47
46
  """List jobs for a given teamspace.
@@ -81,8 +80,7 @@ class _List(_TeamspacesMenu):
81
80
  f"{j.total_cost:.3f}",
82
81
  )
83
82
 
84
- console = Console()
85
- console.print(table)
83
+ Console().print(table)
86
84
 
87
85
  def mmts(self, teamspace: Optional[str] = None) -> None:
88
86
  """List multi-machine jobs for a given teamspace.
@@ -122,8 +120,7 @@ class _List(_TeamspacesMenu):
122
120
  str(j.total_cost),
123
121
  )
124
122
 
125
- console = Console()
126
- console.print(table)
123
+ Console().print(table)
127
124
 
128
125
  def containers(self, teamspace: Optional[str] = None) -> None:
129
126
  """Display the list of available containers.
@@ -141,8 +138,7 @@ class _List(_TeamspacesMenu):
141
138
  table.add_column("CREATED")
142
139
  for repo in result:
143
140
  table.add_row(repo["REPOSITORY"], repo["IMAGE ID"], repo["CREATED"])
144
- console = Console()
145
- console.print(table)
141
+ Console().print(table)
146
142
 
147
143
  def machines(self) -> None:
148
144
  """Display the list of available machines."""
@@ -156,5 +152,4 @@ class _List(_TeamspacesMenu):
156
152
  for name in sorted(machine_types):
157
153
  table.add_row(name)
158
154
 
159
- console = Console()
160
- console.print(table)
155
+ Console().print(table)
@@ -1,5 +1,6 @@
1
1
  from typing import Dict, List, Optional
2
2
 
3
+ from rich.console import Console
3
4
  from simple_term_menu import TerminalMenu
4
5
 
5
6
  from lightning_sdk.cli.exceptions import StudioCliError
@@ -20,7 +21,7 @@ class _MMTsMenu:
20
21
  if j.name == mmt:
21
22
  return j
22
23
 
23
- print("Could not find Multi-Machine Job {mmt}, please select it from the list:")
24
+ Console().print("Could not find Multi-Machine Job {mmt}, please select it from the list:")
24
25
  return self._get_mmt_from_interactive_menu(possible_mmts)
25
26
 
26
27
  @staticmethod
lightning_sdk/cli/run.py CHANGED
@@ -8,7 +8,7 @@ from lightning_sdk.teamspace import Teamspace
8
8
  if TYPE_CHECKING:
9
9
  from lightning_sdk.cli.legacy import _LegacyLightningCLI
10
10
 
11
- _MACHINE_VALUES = tuple([machine.value for machine in Machine])
11
+ _MACHINE_VALUES = tuple([machine.name for machine in Machine.__dict__.values() if isinstance(machine, Machine)])
12
12
 
13
13
 
14
14
  class _Run:
@@ -156,7 +156,7 @@ class _Run:
156
156
  machine = "CPU"
157
157
  machine_enum: Union[str, Machine]
158
158
  try:
159
- machine_enum = Machine[machine.upper()]
159
+ machine_enum = getattr(Machine, machine.upper(), Machine(machine, machine))
160
160
  except KeyError:
161
161
  machine_enum = machine
162
162
 
@@ -222,7 +222,7 @@ class _Run:
222
222
  machine = "CPU"
223
223
  machine_enum: Union[str, Machine]
224
224
  try:
225
- machine_enum = Machine[machine.upper()]
225
+ machine_enum = getattr(Machine, machine.upper(), Machine(machine, machine))
226
226
  except KeyError:
227
227
  machine_enum = machine
228
228
 
@@ -167,7 +167,6 @@ class _Docker:
167
167
  import litserve as ls
168
168
  from litserve import docker_builder
169
169
 
170
- console = Console()
171
170
  requirements = ""
172
171
  if os.path.exists("requirements.txt"):
173
172
  requirements = "-r requirements.txt"
@@ -210,5 +209,5 @@ Update [underline]{os.path.abspath("Dockerfile")}[/underline] to add any additio
210
209
  [bold]To push the container to a registry:[/bold]
211
210
  > [underline]docker push {tag}[/underline]
212
211
  """
213
- console.print(success_msg)
212
+ Console().print(success_msg)
214
213
  return os.path.abspath("Dockerfile")
@@ -7,7 +7,7 @@ class _Start:
7
7
  """Start resources on the Lightning AI platform."""
8
8
 
9
9
  def __init__(self) -> None:
10
- _machine_values = tuple([machine.value for machine in Machine])
10
+ _machine_values = tuple([machine.name for machine in Machine.__dict__.values() if isinstance(machine, Machine)])
11
11
 
12
12
  docstr_studio = f"""Start a studio on a given machine.
13
13
 
@@ -36,7 +36,7 @@ class _Start:
36
36
  studio = Studio(name=name, teamspace=teamspace, org=None, user=owner, create_ok=False)
37
37
 
38
38
  try:
39
- resolved_machine = Machine[machine.upper()]
39
+ resolved_machine = getattr(Machine, machine.upper(), Machine(machine, machine))
40
40
  except KeyError:
41
41
  resolved_machine = machine
42
42
 
lightning_sdk/cli/stop.py CHANGED
@@ -1,5 +1,7 @@
1
1
  from typing import Optional
2
2
 
3
+ from rich.console import Console
4
+
3
5
  from lightning_sdk.cli.job_and_mmt_action import _JobAndMMTAction
4
6
  from lightning_sdk.studio import Studio
5
7
 
@@ -20,7 +22,7 @@ class _Stop(_JobAndMMTAction):
20
22
  job = super().job(name=name, teamspace=teamspace)
21
23
 
22
24
  job.stop()
23
- print(f"Successfully stopped {job.name}!")
25
+ Console().print(f"Successfully stopped {job.name}!")
24
26
 
25
27
  def mmt(self, name: Optional[str] = None, teamspace: Optional[str] = None) -> None:
26
28
  """Stop a multi-machine job.
@@ -35,7 +37,7 @@ class _Stop(_JobAndMMTAction):
35
37
  mmt = super().mmt(name=name, teamspace=teamspace)
36
38
 
37
39
  mmt.stop()
38
- print(f"Successfully stopped {mmt.name}!")
40
+ Console().print(f"Successfully stopped {mmt.name}!")
39
41
 
40
42
  def studio(self, name: Optional[str] = None, teamspace: Optional[str] = None) -> None:
41
43
  """Stop a running studio.
@@ -60,4 +62,4 @@ class _Stop(_JobAndMMTAction):
60
62
  studio = Studio(name=name, teamspace=teamspace, org=None, user=owner, create_ok=False)
61
63
 
62
64
  studio.stop()
63
- print("Studio successfully stopped")
65
+ Console().print("Studio successfully stopped")
@@ -1,7 +1,9 @@
1
1
  from typing import Dict, List, Optional
2
2
 
3
+ from rich.console import Console
3
4
  from simple_term_menu import TerminalMenu
4
5
 
6
+ from lightning_sdk import Studio
5
7
  from lightning_sdk.api import OrgApi, TeamspaceApi
6
8
  from lightning_sdk.user import User
7
9
 
@@ -18,7 +20,7 @@ class _StudiosMenu:
18
20
  if st["teamspace"] == teamspace and name == st["name"]:
19
21
  return st
20
22
 
21
- print("Could not find Studio {studio}, please select it from the list:")
23
+ Console().print("Could not find Studio {studio}, please select it from the list:")
22
24
  return self._get_studio_from_interactive_menu(possible_studios)
23
25
 
24
26
  @staticmethod
@@ -76,3 +78,24 @@ class _StudiosMenu:
76
78
  possible_studios.append({"name": st.name, **teamspaces[teamspace_id]})
77
79
 
78
80
  return possible_studios
81
+
82
+ def _get_studio(self, name: str, teamspace: str) -> Studio:
83
+ """Get studio object from name and teamspace.
84
+
85
+ Args:
86
+ name: Name of the studio
87
+ teamspace: Name of the teamspace
88
+ """
89
+ if teamspace:
90
+ ts_splits = teamspace.split("/")
91
+ if len(ts_splits) != 2:
92
+ raise ValueError(f"Teamspace should be of format <OWNER>/<TEAMSPACE_NAME> but got {teamspace}")
93
+ owner, teamspace = ts_splits
94
+ else:
95
+ owner, teamspace = None, None
96
+
97
+ try:
98
+ studio = Studio(name=name, teamspace=teamspace, org=owner, user=None, create_ok=False)
99
+ except (RuntimeError, ValueError):
100
+ studio = Studio(name=name, teamspace=teamspace, org=None, user=owner, create_ok=False)
101
+ return studio
@@ -7,7 +7,7 @@ class _Switch:
7
7
  """Switch machines for resources on the Lightning AI platform."""
8
8
 
9
9
  def __init__(self) -> None:
10
- _machine_values = tuple([machine.value for machine in Machine])
10
+ _machine_values = tuple([machine.name for machine in Machine.__dict__.values() if isinstance(machine, Machine)])
11
11
 
12
12
  docstr_studio = f"""Switch a studio to a given machine.
13
13
 
@@ -36,7 +36,7 @@ class _Switch:
36
36
  studio = Studio(name=name, teamspace=teamspace, org=None, user=owner, create_ok=False)
37
37
 
38
38
  try:
39
- resolved_machine = Machine[machine.upper()]
39
+ resolved_machine = getattr(Machine, machine.upper(), Machine(machine, machine))
40
40
  except KeyError:
41
41
  resolved_machine = machine
42
42
 
@@ -1,5 +1,6 @@
1
1
  from typing import Dict, List, Optional
2
2
 
3
+ from rich.console import Console
3
4
  from simple_term_menu import TerminalMenu
4
5
 
5
6
  from lightning_sdk.api import OrgApi
@@ -26,7 +27,7 @@ class _TeamspacesMenu:
26
27
  if ts["name"] == name and (ts["user"] == owner or ts["org"] == owner):
27
28
  return ts
28
29
 
29
- print("Could not find Teamspace {teamspace}, please select it from the list:")
30
+ Console().print("Could not find Teamspace {teamspace}, please select it from the list:")
30
31
  return self._get_teamspace_from_interactive_menu(possible_teamspaces)
31
32
 
32
33
  @staticmethod
@@ -71,6 +71,7 @@ class _Uploads(_StudiosMenu, _TeamspacesMenu):
71
71
  If not specified, will use the file or directory name of the path you want to upload
72
72
  and place it in your home directory.
73
73
  """
74
+ console = Console()
74
75
  if remote_path is None:
75
76
  remote_path = os.path.basename(path)
76
77
 
@@ -81,7 +82,7 @@ class _Uploads(_StudiosMenu, _TeamspacesMenu):
81
82
 
82
83
  selected_studio = self._resolve_studio(studio)
83
84
 
84
- print(f"Uploading to {selected_studio.teamspace.name}/{selected_studio.name}")
85
+ console.print(f"Uploading to {selected_studio.teamspace.name}/{selected_studio.name}")
85
86
 
86
87
  pairs = {}
87
88
  for root, _, files in os.walk(path):
@@ -112,7 +113,7 @@ class _Uploads(_StudiosMenu, _TeamspacesMenu):
112
113
  + "/studios/"
113
114
  + selected_studio.name
114
115
  )
115
- print(f"See your files at {studio_url}")
116
+ console.print(f"See your files at {studio_url}")
116
117
 
117
118
  def file(self, path: str, studio: Optional[str] = None, remote_path: Optional[str] = None) -> None:
118
119
  """Upload a file to a Studio.
@@ -126,6 +127,7 @@ class _Uploads(_StudiosMenu, _TeamspacesMenu):
126
127
  If not specified, will use the name of the file you want to upload
127
128
  and place it in your home directory.
128
129
  """
130
+ console = Console()
129
131
  if remote_path is None:
130
132
  remote_path = os.path.basename(path)
131
133
 
@@ -136,7 +138,7 @@ class _Uploads(_StudiosMenu, _TeamspacesMenu):
136
138
 
137
139
  selected_studio = self._resolve_studio(studio)
138
140
 
139
- print(f"Uploading to {selected_studio.teamspace.name}/{selected_studio.name}")
141
+ console.print(f"Uploading to {selected_studio.teamspace.name}/{selected_studio.name}")
140
142
 
141
143
  self._single_file_upload(selected_studio, path, remote_path, True)
142
144
 
@@ -149,7 +151,7 @@ class _Uploads(_StudiosMenu, _TeamspacesMenu):
149
151
  + "/studios/"
150
152
  + selected_studio.name
151
153
  )
152
- print(f"See your file at {studio_url}")
154
+ console.print(f"See your file at {studio_url}")
153
155
 
154
156
  def container(self, container: str, tag: str = "latest", teamspace: Optional[str] = None) -> None:
155
157
  teamspace = self._resolve_teamspace(teamspace)
@@ -124,6 +124,7 @@ from lightning_sdk.lightning_cloud.openapi.models.id_publications_body import Id
124
124
  from lightning_sdk.lightning_cloud.openapi.models.id_publications_body1 import IdPublicationsBody1
125
125
  from lightning_sdk.lightning_cloud.openapi.models.id_release_body import IdReleaseBody
126
126
  from lightning_sdk.lightning_cloud.openapi.models.id_reportlogsactivity_body import IdReportlogsactivityBody
127
+ from lightning_sdk.lightning_cloud.openapi.models.id_reportrestarttimings_body import IdReportrestarttimingsBody
127
128
  from lightning_sdk.lightning_cloud.openapi.models.id_start_body import IdStartBody
128
129
  from lightning_sdk.lightning_cloud.openapi.models.id_storage_body import IdStorageBody
129
130
  from lightning_sdk.lightning_cloud.openapi.models.id_uploads_body import IdUploadsBody
@@ -446,6 +447,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_agent_job_logs_metadata
446
447
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_artifacts_page_response import V1GetArtifactsPageResponse
447
448
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_cloud_space_instance_status_response import V1GetCloudSpaceInstanceStatusResponse
448
449
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_cloud_space_size_response import V1GetCloudSpaceSizeResponse
450
+ from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_accelerator_demand_response import V1GetClusterAcceleratorDemandResponse
449
451
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_cluster_credentials_response import V1GetClusterCredentialsResponse
450
452
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_deployment_routing_telemetry_aggregated_response import V1GetDeploymentRoutingTelemetryAggregatedResponse
451
453
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_deployment_routing_telemetry_response import V1GetDeploymentRoutingTelemetryResponse
@@ -701,6 +703,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_refresh_response import V1R
701
703
  from lightning_sdk.lightning_cloud.openapi.models.v1_region_state import V1RegionState
702
704
  from lightning_sdk.lightning_cloud.openapi.models.v1_regional_load_balancer import V1RegionalLoadBalancer
703
705
  from lightning_sdk.lightning_cloud.openapi.models.v1_report_logs_activity_response import V1ReportLogsActivityResponse
706
+ from lightning_sdk.lightning_cloud.openapi.models.v1_report_restart_timings_response import V1ReportRestartTimingsResponse
704
707
  from lightning_sdk.lightning_cloud.openapi.models.v1_request_cluster_access_request import V1RequestClusterAccessRequest
705
708
  from lightning_sdk.lightning_cloud.openapi.models.v1_request_cluster_access_response import V1RequestClusterAccessResponse
706
709
  from lightning_sdk.lightning_cloud.openapi.models.v1_request_verification_code_response import V1RequestVerificationCodeResponse
@@ -710,6 +713,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_resources import V1Resource
710
713
  from lightning_sdk.lightning_cloud.openapi.models.v1_response_choice import V1ResponseChoice
711
714
  from lightning_sdk.lightning_cloud.openapi.models.v1_response_choice_delta import V1ResponseChoiceDelta
712
715
  from lightning_sdk.lightning_cloud.openapi.models.v1_restart_cloud_space_instance_response import V1RestartCloudSpaceInstanceResponse
716
+ from lightning_sdk.lightning_cloud.openapi.models.v1_restart_timing import V1RestartTiming
713
717
  from lightning_sdk.lightning_cloud.openapi.models.v1_restore_deployment_release_response import V1RestoreDeploymentReleaseResponse
714
718
  from lightning_sdk.lightning_cloud.openapi.models.v1_role import V1Role
715
719
  from lightning_sdk.lightning_cloud.openapi.models.v1_rolling_update_strategy import V1RollingUpdateStrategy
@@ -1529,6 +1529,111 @@ class ClusterServiceApi(object):
1529
1529
  _request_timeout=params.get('_request_timeout'),
1530
1530
  collection_formats=collection_formats)
1531
1531
 
1532
+ def cluster_service_get_cluster_accelerator_demand(self, cluster_id: 'str', id: 'str', **kwargs) -> 'V1GetClusterAcceleratorDemandResponse': # noqa: E501
1533
+ """cluster_service_get_cluster_accelerator_demand # noqa: E501
1534
+
1535
+ This method makes a synchronous HTTP request by default. To make an
1536
+ asynchronous HTTP request, please pass async_req=True
1537
+ >>> thread = api.cluster_service_get_cluster_accelerator_demand(cluster_id, id, async_req=True)
1538
+ >>> result = thread.get()
1539
+
1540
+ :param async_req bool
1541
+ :param str cluster_id: (required)
1542
+ :param str id: (required)
1543
+ :param bool spot:
1544
+ :return: V1GetClusterAcceleratorDemandResponse
1545
+ If the method is called asynchronously,
1546
+ returns the request thread.
1547
+ """
1548
+ kwargs['_return_http_data_only'] = True
1549
+ if kwargs.get('async_req'):
1550
+ return self.cluster_service_get_cluster_accelerator_demand_with_http_info(cluster_id, id, **kwargs) # noqa: E501
1551
+ else:
1552
+ (data) = self.cluster_service_get_cluster_accelerator_demand_with_http_info(cluster_id, id, **kwargs) # noqa: E501
1553
+ return data
1554
+
1555
+ def cluster_service_get_cluster_accelerator_demand_with_http_info(self, cluster_id: 'str', id: 'str', **kwargs) -> 'V1GetClusterAcceleratorDemandResponse': # noqa: E501
1556
+ """cluster_service_get_cluster_accelerator_demand # noqa: E501
1557
+
1558
+ This method makes a synchronous HTTP request by default. To make an
1559
+ asynchronous HTTP request, please pass async_req=True
1560
+ >>> thread = api.cluster_service_get_cluster_accelerator_demand_with_http_info(cluster_id, id, async_req=True)
1561
+ >>> result = thread.get()
1562
+
1563
+ :param async_req bool
1564
+ :param str cluster_id: (required)
1565
+ :param str id: (required)
1566
+ :param bool spot:
1567
+ :return: V1GetClusterAcceleratorDemandResponse
1568
+ If the method is called asynchronously,
1569
+ returns the request thread.
1570
+ """
1571
+
1572
+ all_params = ['cluster_id', 'id', 'spot'] # noqa: E501
1573
+ all_params.append('async_req')
1574
+ all_params.append('_return_http_data_only')
1575
+ all_params.append('_preload_content')
1576
+ all_params.append('_request_timeout')
1577
+
1578
+ params = locals()
1579
+ for key, val in six.iteritems(params['kwargs']):
1580
+ if key not in all_params:
1581
+ raise TypeError(
1582
+ "Got an unexpected keyword argument '%s'"
1583
+ " to method cluster_service_get_cluster_accelerator_demand" % key
1584
+ )
1585
+ params[key] = val
1586
+ del params['kwargs']
1587
+ # verify the required parameter 'cluster_id' is set
1588
+ if ('cluster_id' not in params or
1589
+ params['cluster_id'] is None):
1590
+ raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_get_cluster_accelerator_demand`") # noqa: E501
1591
+ # verify the required parameter 'id' is set
1592
+ if ('id' not in params or
1593
+ params['id'] is None):
1594
+ raise ValueError("Missing the required parameter `id` when calling `cluster_service_get_cluster_accelerator_demand`") # noqa: E501
1595
+
1596
+ collection_formats = {}
1597
+
1598
+ path_params = {}
1599
+ if 'cluster_id' in params:
1600
+ path_params['clusterId'] = params['cluster_id'] # noqa: E501
1601
+ if 'id' in params:
1602
+ path_params['id'] = params['id'] # noqa: E501
1603
+
1604
+ query_params = []
1605
+ if 'spot' in params:
1606
+ query_params.append(('spot', params['spot'])) # noqa: E501
1607
+
1608
+ header_params = {}
1609
+
1610
+ form_params = []
1611
+ local_var_files = {}
1612
+
1613
+ body_params = None
1614
+ # HTTP header `Accept`
1615
+ header_params['Accept'] = self.api_client.select_header_accept(
1616
+ ['application/json']) # noqa: E501
1617
+
1618
+ # Authentication setting
1619
+ auth_settings = [] # noqa: E501
1620
+
1621
+ return self.api_client.call_api(
1622
+ '/v1/core/clusters/{clusterId}/accelerator/{id}/demand', 'GET',
1623
+ path_params,
1624
+ query_params,
1625
+ header_params,
1626
+ body=body_params,
1627
+ post_params=form_params,
1628
+ files=local_var_files,
1629
+ response_type='V1GetClusterAcceleratorDemandResponse', # noqa: E501
1630
+ auth_settings=auth_settings,
1631
+ async_req=params.get('async_req'),
1632
+ _return_http_data_only=params.get('_return_http_data_only'),
1633
+ _preload_content=params.get('_preload_content', True),
1634
+ _request_timeout=params.get('_request_timeout'),
1635
+ collection_formats=collection_formats)
1636
+
1532
1637
  def cluster_service_get_cluster_availability(self, **kwargs) -> 'V1ClusterAvailability': # noqa: E501
1533
1638
  """cluster_service_get_cluster_availability # noqa: E501
1534
1639
 
@@ -3035,6 +3035,119 @@ class JobsServiceApi(object):
3035
3035
  _request_timeout=params.get('_request_timeout'),
3036
3036
  collection_formats=collection_formats)
3037
3037
 
3038
+ def jobs_service_report_restart_timings(self, body: 'IdReportrestarttimingsBody', project_id: 'str', id: 'str', **kwargs) -> 'V1ReportRestartTimingsResponse': # noqa: E501
3039
+ """The tired proxy collects the time at which the user logs started and inform the CP # noqa: E501
3040
+
3041
+ This method makes a synchronous HTTP request by default. To make an
3042
+ asynchronous HTTP request, please pass async_req=True
3043
+ >>> thread = api.jobs_service_report_restart_timings(body, project_id, id, async_req=True)
3044
+ >>> result = thread.get()
3045
+
3046
+ :param async_req bool
3047
+ :param IdReportrestarttimingsBody body: (required)
3048
+ :param str project_id: (required)
3049
+ :param str id: (required)
3050
+ :return: V1ReportRestartTimingsResponse
3051
+ If the method is called asynchronously,
3052
+ returns the request thread.
3053
+ """
3054
+ kwargs['_return_http_data_only'] = True
3055
+ if kwargs.get('async_req'):
3056
+ return self.jobs_service_report_restart_timings_with_http_info(body, project_id, id, **kwargs) # noqa: E501
3057
+ else:
3058
+ (data) = self.jobs_service_report_restart_timings_with_http_info(body, project_id, id, **kwargs) # noqa: E501
3059
+ return data
3060
+
3061
+ def jobs_service_report_restart_timings_with_http_info(self, body: 'IdReportrestarttimingsBody', project_id: 'str', id: 'str', **kwargs) -> 'V1ReportRestartTimingsResponse': # noqa: E501
3062
+ """The tired proxy collects the time at which the user logs started and inform the CP # noqa: E501
3063
+
3064
+ This method makes a synchronous HTTP request by default. To make an
3065
+ asynchronous HTTP request, please pass async_req=True
3066
+ >>> thread = api.jobs_service_report_restart_timings_with_http_info(body, project_id, id, async_req=True)
3067
+ >>> result = thread.get()
3068
+
3069
+ :param async_req bool
3070
+ :param IdReportrestarttimingsBody body: (required)
3071
+ :param str project_id: (required)
3072
+ :param str id: (required)
3073
+ :return: V1ReportRestartTimingsResponse
3074
+ If the method is called asynchronously,
3075
+ returns the request thread.
3076
+ """
3077
+
3078
+ all_params = ['body', 'project_id', 'id'] # noqa: E501
3079
+ all_params.append('async_req')
3080
+ all_params.append('_return_http_data_only')
3081
+ all_params.append('_preload_content')
3082
+ all_params.append('_request_timeout')
3083
+
3084
+ params = locals()
3085
+ for key, val in six.iteritems(params['kwargs']):
3086
+ if key not in all_params:
3087
+ raise TypeError(
3088
+ "Got an unexpected keyword argument '%s'"
3089
+ " to method jobs_service_report_restart_timings" % key
3090
+ )
3091
+ params[key] = val
3092
+ del params['kwargs']
3093
+ # verify the required parameter 'body' is set
3094
+ if ('body' not in params or
3095
+ params['body'] is None):
3096
+ raise ValueError("Missing the required parameter `body` when calling `jobs_service_report_restart_timings`") # noqa: E501
3097
+ # verify the required parameter 'project_id' is set
3098
+ if ('project_id' not in params or
3099
+ params['project_id'] is None):
3100
+ raise ValueError("Missing the required parameter `project_id` when calling `jobs_service_report_restart_timings`") # noqa: E501
3101
+ # verify the required parameter 'id' is set
3102
+ if ('id' not in params or
3103
+ params['id'] is None):
3104
+ raise ValueError("Missing the required parameter `id` when calling `jobs_service_report_restart_timings`") # noqa: E501
3105
+
3106
+ collection_formats = {}
3107
+
3108
+ path_params = {}
3109
+ if 'project_id' in params:
3110
+ path_params['projectId'] = params['project_id'] # noqa: E501
3111
+ if 'id' in params:
3112
+ path_params['id'] = params['id'] # noqa: E501
3113
+
3114
+ query_params = []
3115
+
3116
+ header_params = {}
3117
+
3118
+ form_params = []
3119
+ local_var_files = {}
3120
+
3121
+ body_params = None
3122
+ if 'body' in params:
3123
+ body_params = params['body']
3124
+ # HTTP header `Accept`
3125
+ header_params['Accept'] = self.api_client.select_header_accept(
3126
+ ['application/json']) # noqa: E501
3127
+
3128
+ # HTTP header `Content-Type`
3129
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3130
+ ['application/json']) # noqa: E501
3131
+
3132
+ # Authentication setting
3133
+ auth_settings = [] # noqa: E501
3134
+
3135
+ return self.api_client.call_api(
3136
+ '/v1/projects/{projectId}/jobs/{id}/report-restart-timings', 'PUT',
3137
+ path_params,
3138
+ query_params,
3139
+ header_params,
3140
+ body=body_params,
3141
+ post_params=form_params,
3142
+ files=local_var_files,
3143
+ response_type='V1ReportRestartTimingsResponse', # noqa: E501
3144
+ auth_settings=auth_settings,
3145
+ async_req=params.get('async_req'),
3146
+ _return_http_data_only=params.get('_return_http_data_only'),
3147
+ _preload_content=params.get('_preload_content', True),
3148
+ _request_timeout=params.get('_request_timeout'),
3149
+ collection_formats=collection_formats)
3150
+
3038
3151
  def jobs_service_restore_deployment_release(self, body: 'object', project_id: 'str', deployment_id: 'str', id: 'str', **kwargs) -> 'V1RestoreDeploymentReleaseResponse': # noqa: E501
3039
3152
  """jobs_service_restore_deployment_release # noqa: E501
3040
3153
 
@@ -53,7 +53,7 @@ class LitRegistryServiceApi(object):
53
53
 
54
54
  :param async_req bool
55
55
  :param ProjectIdLitregistryBody body: (required)
56
- :param str project_id: (required)
56
+ :param str project_id: The teamspace project_id (required)
57
57
  :return: V1LitRegistryProject
58
58
  If the method is called asynchronously,
59
59
  returns the request thread.
@@ -75,7 +75,7 @@ class LitRegistryServiceApi(object):
75
75
 
76
76
  :param async_req bool
77
77
  :param ProjectIdLitregistryBody body: (required)
78
- :param str project_id: (required)
78
+ :param str project_id: The teamspace project_id (required)
79
79
  :return: V1LitRegistryProject
80
80
  If the method is called asynchronously,
81
81
  returns the request thread.
@@ -563,6 +563,7 @@ class LitRegistryServiceApi(object):
563
563
  :param async_req bool
564
564
  :param str project_id: (required)
565
565
  :param str lit_repo_name: (required)
566
+ :param bool latest_only:
566
567
  :return: V1ListLitRegistryRepositoryImageArtifactVersionsResponse
567
568
  If the method is called asynchronously,
568
569
  returns the request thread.
@@ -585,12 +586,13 @@ class LitRegistryServiceApi(object):
585
586
  :param async_req bool
586
587
  :param str project_id: (required)
587
588
  :param str lit_repo_name: (required)
589
+ :param bool latest_only:
588
590
  :return: V1ListLitRegistryRepositoryImageArtifactVersionsResponse
589
591
  If the method is called asynchronously,
590
592
  returns the request thread.
591
593
  """
592
594
 
593
- all_params = ['project_id', 'lit_repo_name'] # noqa: E501
595
+ all_params = ['project_id', 'lit_repo_name', 'latest_only'] # noqa: E501
594
596
  all_params.append('async_req')
595
597
  all_params.append('_return_http_data_only')
596
598
  all_params.append('_preload_content')
@@ -623,6 +625,8 @@ class LitRegistryServiceApi(object):
623
625
  path_params['litRepoName'] = params['lit_repo_name'] # noqa: E501
624
626
 
625
627
  query_params = []
628
+ if 'latest_only' in params:
629
+ query_params.append(('latestOnly', params['latest_only'])) # noqa: E501
626
630
 
627
631
  header_params = {}
628
632
 
@@ -578,7 +578,6 @@ class ProjectsServiceApi(object):
578
578
 
579
579
  :param async_req bool
580
580
  :param str id: (required)
581
- :param bool skip_balance_check:
582
581
  :param str balance_destination_id:
583
582
  :param bool is_org:
584
583
  :return: V1DeleteProjectResponse
@@ -602,7 +601,6 @@ class ProjectsServiceApi(object):
602
601
 
603
602
  :param async_req bool
604
603
  :param str id: (required)
605
- :param bool skip_balance_check:
606
604
  :param str balance_destination_id:
607
605
  :param bool is_org:
608
606
  :return: V1DeleteProjectResponse
@@ -610,7 +608,7 @@ class ProjectsServiceApi(object):
610
608
  returns the request thread.
611
609
  """
612
610
 
613
- all_params = ['id', 'skip_balance_check', 'balance_destination_id', 'is_org'] # noqa: E501
611
+ all_params = ['id', 'balance_destination_id', 'is_org'] # noqa: E501
614
612
  all_params.append('async_req')
615
613
  all_params.append('_return_http_data_only')
616
614
  all_params.append('_preload_content')
@@ -637,8 +635,6 @@ class ProjectsServiceApi(object):
637
635
  path_params['id'] = params['id'] # noqa: E501
638
636
 
639
637
  query_params = []
640
- if 'skip_balance_check' in params:
641
- query_params.append(('skipBalanceCheck', params['skip_balance_check'])) # noqa: E501
642
638
  if 'balance_destination_id' in params:
643
639
  query_params.append(('balanceDestinationId', params['balance_destination_id'])) # noqa: E501
644
640
  if 'is_org' in params: