lightning-sdk 0.1.50__py3-none-any.whl → 0.1.51__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 (39) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/job_api.py +12 -7
  3. lightning_sdk/api/lit_container_api.py +24 -7
  4. lightning_sdk/api/mmt_api.py +12 -7
  5. lightning_sdk/api/utils.py +52 -0
  6. lightning_sdk/cli/run.py +60 -18
  7. lightning_sdk/cli/serve.py +1 -5
  8. lightning_sdk/cli/upload.py +33 -15
  9. lightning_sdk/helpers.py +1 -1
  10. lightning_sdk/job/base.py +12 -1
  11. lightning_sdk/job/job.py +27 -25
  12. lightning_sdk/job/v1.py +6 -2
  13. lightning_sdk/job/v2.py +12 -12
  14. lightning_sdk/lightning_cloud/login.py +4 -1
  15. lightning_sdk/lightning_cloud/openapi/__init__.py +3 -0
  16. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +5 -1
  17. lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +113 -0
  18. lightning_sdk/lightning_cloud/openapi/models/__init__.py +3 -0
  19. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
  20. lightning_sdk/lightning_cloud/openapi/models/litregistry_lit_repo_name_body.py +123 -0
  21. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +27 -1
  22. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
  23. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_api.py +27 -1
  24. lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
  25. lightning_sdk/lightning_cloud/openapi/models/v1_path_mapping.py +175 -0
  26. lightning_sdk/lightning_cloud/openapi/models/v1_update_lit_repository_response.py +97 -0
  27. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +79 -79
  28. lightning_sdk/mmt/base.py +36 -26
  29. lightning_sdk/mmt/mmt.py +27 -25
  30. lightning_sdk/mmt/v1.py +4 -1
  31. lightning_sdk/mmt/v2.py +14 -13
  32. lightning_sdk/models.py +5 -4
  33. lightning_sdk/utils/resolve.py +7 -0
  34. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.51.dist-info}/METADATA +2 -2
  35. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.51.dist-info}/RECORD +39 -36
  36. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.51.dist-info}/LICENSE +0 -0
  37. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.51.dist-info}/WHEEL +0 -0
  38. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.51.dist-info}/entry_points.txt +0 -0
  39. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.51.dist-info}/top_level.txt +0 -0
lightning_sdk/job/v1.py CHANGED
@@ -85,6 +85,7 @@ class _JobV1(_BaseJob):
85
85
  image_credentials=None,
86
86
  cloud_account_auth=False,
87
87
  cluster=cluster,
88
+ path_mappings=None,
88
89
  )
89
90
 
90
91
  def _submit(
@@ -101,6 +102,7 @@ class _JobV1(_BaseJob):
101
102
  artifacts_local: Optional[str] = None,
102
103
  artifacts_remote: Optional[str] = None,
103
104
  entrypoint: str = "sh -c",
105
+ path_mappings: Optional[Dict[str, str]] = None,
104
106
  ) -> "_JobV1":
105
107
  """Submit a job to run on a machine.
106
108
 
@@ -114,12 +116,11 @@ class _JobV1(_BaseJob):
114
116
  cloud_account: The cloud account to run the job on.
115
117
  image_credentials: The image credentials for the job (not supported).
116
118
  cloud_account_auth: Whether to use cloud account authentication for the job (not supported).
117
- artifacts_local: The local path for persisting artifacts (not supported).
118
- artifacts_remote: The remote path for persisting artifacts (not supported).
119
119
  entrypoint: The entrypoint of your docker container (not supported).
120
120
  Defaults to `sh -c` which just runs the provided command in a standard shell.
121
121
  To use the pre-defined entrypoint of the provided image, set this to an empty string.
122
122
  Only applicable when submitting docker jobs.
123
+ path_mappings: The mappings from data connection inside your container (not supported)
123
124
 
124
125
  Returns:
125
126
  The submitted job.
@@ -141,6 +142,9 @@ class _JobV1(_BaseJob):
141
142
  if entrypoint != "sh -c":
142
143
  raise ValueError("Specifying the entrypoint is not yet supported with jobs")
143
144
 
145
+ if path_mappings is not None:
146
+ raise ValueError("Specifying path mappings is not yet supported with jobs")
147
+
144
148
  # TODO: add support for empty names (will give an empty string)
145
149
  _submitted = self._job_api.submit_job(
146
150
  name=self._name,
lightning_sdk/job/v2.py CHANGED
@@ -46,9 +46,10 @@ class _JobV2(_BaseJob):
46
46
  cloud_account: Optional[str] = None,
47
47
  image_credentials: Optional[str] = None,
48
48
  cloud_account_auth: bool = False,
49
- artifacts_local: Optional[str] = None,
50
- artifacts_remote: Optional[str] = None,
51
49
  entrypoint: str = "sh -c",
50
+ path_mappings: Optional[Dict[str, str]] = None,
51
+ artifacts_local: Optional[str] = None, # deprecated in favor of path_mappings
52
+ artifacts_remote: Optional[str] = None, # deprecated in favor of path_mappings
52
53
  ) -> "_JobV2":
53
54
  """Submit a new job to the Lightning AI platform.
54
55
 
@@ -70,16 +71,14 @@ class _JobV2(_BaseJob):
70
71
  artifacts_local: The path of inside the docker container, you want to persist images from.
71
72
  CAUTION: When setting this to "/", it will effectively erase your container.
72
73
  Only supported for jobs with a docker image compute environment.
73
- artifacts_remote: The remote storage to persist your artifacts to.
74
- Should be of format <CONNECTION_TYPE>:<CONNECTION_NAME>:<PATH_WITHIN_CONNECTION>.
75
- PATH_WITHIN_CONNECTION hereby is a path relative to the connection's root.
76
- E.g. efs:data:some-path would result in an EFS connection named `data` and to the path `some-path`
77
- within it.
78
- Note that the connection needs to be added to the teamspace already in order for it to be found.
79
- Only supported for jobs with a docker image compute environment.
80
- entrypoint: The entrypoint of your docker container. Defaults to `sh -c` which
81
- just runs the provided command in a standard shell.
82
- To use the pre-defined entrypoint of the provided image, set this to an empty string.
74
+ path_mappings: Dictionary of path mappings. The keys are the path inside the container whereas the value
75
+ represents the data-connection name and the path inside that connection.
76
+ Should be of form
77
+ {
78
+ "<CONTAINER_PATH_1>": "<CONNECTION_NAME_1>:<PATH_WITHIN_CONNECTION_1>",
79
+ "<CONTAINER_PATH_2>": "<CONNECTION_NAME_2>"
80
+ }
81
+ If the path inside the connection is omitted it's assumed to be the root path of that connection.
83
82
  Only applicable when submitting docker jobs.
84
83
  """
85
84
  # Command is required if Studio is provided to know what to run
@@ -114,6 +113,7 @@ class _JobV2(_BaseJob):
114
113
  artifacts_local=artifacts_local,
115
114
  artifacts_remote=artifacts_remote,
116
115
  entrypoint=entrypoint,
116
+ path_mappings=path_mappings,
117
117
  )
118
118
  self._job = submitted
119
119
  self._name = submitted.name
@@ -168,7 +168,10 @@ class AuthServer:
168
168
  ok = webbrowser.open(url)
169
169
  if not ok:
170
170
  # can't open a browser, authentication failed
171
- raise RuntimeError("Failed to authenticate to Lightning. When running without access to a browser, `LIGHTNING_USER_ID` and `LIGHTNING_API_KEY` should be exported.")
171
+ deployment_id = os.environ.get("LIGHTNING_DEPLOYMENT_ID", None)
172
+ if deployment_id is not None and deployment_id != "":
173
+ raise RuntimeError("Failed to authenticate to Lightning. Ensure that you have selected 'Include SDK credentials' in the 'Environment' section of the deployment settings.")
174
+ raise RuntimeError("Failed to authenticate to Lightning. When running without access to a browser, 'LIGHTNING_USER_ID' and 'LIGHTNING_API_KEY' should be exported.")
172
175
 
173
176
  @app.get("/login-complete")
174
177
  async def save_token(request: Request,
@@ -133,6 +133,7 @@ from lightning_sdk.lightning_cloud.openapi.models.jobs_id_body2 import JobsIdBod
133
133
  from lightning_sdk.lightning_cloud.openapi.models.jobs_id_body3 import JobsIdBody3
134
134
  from lightning_sdk.lightning_cloud.openapi.models.litloggermetrics_id_body import LitloggermetricsIdBody
135
135
  from lightning_sdk.lightning_cloud.openapi.models.litpages_id_body import LitpagesIdBody
136
+ from lightning_sdk.lightning_cloud.openapi.models.litregistry_lit_repo_name_body import LitregistryLitRepoNameBody
136
137
  from lightning_sdk.lightning_cloud.openapi.models.loggermetrics_id_body import LoggermetricsIdBody
137
138
  from lightning_sdk.lightning_cloud.openapi.models.metrics_stream_id_loggerartifacts_body import MetricsStreamIdLoggerartifactsBody
138
139
  from lightning_sdk.lightning_cloud.openapi.models.metricsstream_create_body import MetricsstreamCreateBody
@@ -646,6 +647,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_organization import V1Organ
646
647
  from lightning_sdk.lightning_cloud.openapi.models.v1_owner_type import V1OwnerType
647
648
  from lightning_sdk.lightning_cloud.openapi.models.v1_package_manager import V1PackageManager
648
649
  from lightning_sdk.lightning_cloud.openapi.models.v1_parameterization_spec import V1ParameterizationSpec
650
+ from lightning_sdk.lightning_cloud.openapi.models.v1_path_mapping import V1PathMapping
649
651
  from lightning_sdk.lightning_cloud.openapi.models.v1_path_telemetry import V1PathTelemetry
650
652
  from lightning_sdk.lightning_cloud.openapi.models.v1_phase_type import V1PhaseType
651
653
  from lightning_sdk.lightning_cloud.openapi.models.v1_plugin import V1Plugin
@@ -753,6 +755,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_accelerators
753
755
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_availability_request import V1UpdateClusterAvailabilityRequest
754
756
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_index_response import V1UpdateIndexResponse
755
757
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_lit_page_response import V1UpdateLitPageResponse
758
+ from lightning_sdk.lightning_cloud.openapi.models.v1_update_lit_repository_response import V1UpdateLitRepositoryResponse
756
759
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_metrics_stream_visibility_response import V1UpdateMetricsStreamVisibilityResponse
757
760
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_model_visibility_response import V1UpdateModelVisibilityResponse
758
761
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_project_cluster_accelerators_response import V1UpdateProjectClusterAcceleratorsResponse
@@ -992,6 +992,7 @@ class JobsServiceApi(object):
992
992
  :param str project_id: (required)
993
993
  :param str id: (required)
994
994
  :param str cloudspace_id:
995
+ :param str deployment_id:
995
996
  :return: V1DownloadJobLogsResponse
996
997
  If the method is called asynchronously,
997
998
  returns the request thread.
@@ -1015,12 +1016,13 @@ class JobsServiceApi(object):
1015
1016
  :param str project_id: (required)
1016
1017
  :param str id: (required)
1017
1018
  :param str cloudspace_id:
1019
+ :param str deployment_id:
1018
1020
  :return: V1DownloadJobLogsResponse
1019
1021
  If the method is called asynchronously,
1020
1022
  returns the request thread.
1021
1023
  """
1022
1024
 
1023
- all_params = ['project_id', 'id', 'cloudspace_id'] # noqa: E501
1025
+ all_params = ['project_id', 'id', 'cloudspace_id', 'deployment_id'] # noqa: E501
1024
1026
  all_params.append('async_req')
1025
1027
  all_params.append('_return_http_data_only')
1026
1028
  all_params.append('_preload_content')
@@ -1055,6 +1057,8 @@ class JobsServiceApi(object):
1055
1057
  query_params = []
1056
1058
  if 'cloudspace_id' in params:
1057
1059
  query_params.append(('cloudspaceId', params['cloudspace_id'])) # noqa: E501
1060
+ if 'deployment_id' in params:
1061
+ query_params.append(('deploymentId', params['deployment_id'])) # noqa: E501
1058
1062
 
1059
1063
  header_params = {}
1060
1064
 
@@ -442,3 +442,116 @@ class LitRegistryServiceApi(object):
442
442
  _preload_content=params.get('_preload_content', True),
443
443
  _request_timeout=params.get('_request_timeout'),
444
444
  collection_formats=collection_formats)
445
+
446
+ def lit_registry_service_update_lit_repository_metadata(self, body: 'LitregistryLitRepoNameBody', project_id: 'str', lit_repo_name: 'str', **kwargs) -> 'V1UpdateLitRepositoryResponse': # noqa: E501
447
+ """lit_registry_service_update_lit_repository_metadata # noqa: E501
448
+
449
+ This method makes a synchronous HTTP request by default. To make an
450
+ asynchronous HTTP request, please pass async_req=True
451
+ >>> thread = api.lit_registry_service_update_lit_repository_metadata(body, project_id, lit_repo_name, async_req=True)
452
+ >>> result = thread.get()
453
+
454
+ :param async_req bool
455
+ :param LitregistryLitRepoNameBody body: (required)
456
+ :param str project_id: (required)
457
+ :param str lit_repo_name: (required)
458
+ :return: V1UpdateLitRepositoryResponse
459
+ If the method is called asynchronously,
460
+ returns the request thread.
461
+ """
462
+ kwargs['_return_http_data_only'] = True
463
+ if kwargs.get('async_req'):
464
+ return self.lit_registry_service_update_lit_repository_metadata_with_http_info(body, project_id, lit_repo_name, **kwargs) # noqa: E501
465
+ else:
466
+ (data) = self.lit_registry_service_update_lit_repository_metadata_with_http_info(body, project_id, lit_repo_name, **kwargs) # noqa: E501
467
+ return data
468
+
469
+ def lit_registry_service_update_lit_repository_metadata_with_http_info(self, body: 'LitregistryLitRepoNameBody', project_id: 'str', lit_repo_name: 'str', **kwargs) -> 'V1UpdateLitRepositoryResponse': # noqa: E501
470
+ """lit_registry_service_update_lit_repository_metadata # noqa: E501
471
+
472
+ This method makes a synchronous HTTP request by default. To make an
473
+ asynchronous HTTP request, please pass async_req=True
474
+ >>> thread = api.lit_registry_service_update_lit_repository_metadata_with_http_info(body, project_id, lit_repo_name, async_req=True)
475
+ >>> result = thread.get()
476
+
477
+ :param async_req bool
478
+ :param LitregistryLitRepoNameBody body: (required)
479
+ :param str project_id: (required)
480
+ :param str lit_repo_name: (required)
481
+ :return: V1UpdateLitRepositoryResponse
482
+ If the method is called asynchronously,
483
+ returns the request thread.
484
+ """
485
+
486
+ all_params = ['body', 'project_id', 'lit_repo_name'] # noqa: E501
487
+ all_params.append('async_req')
488
+ all_params.append('_return_http_data_only')
489
+ all_params.append('_preload_content')
490
+ all_params.append('_request_timeout')
491
+
492
+ params = locals()
493
+ for key, val in six.iteritems(params['kwargs']):
494
+ if key not in all_params:
495
+ raise TypeError(
496
+ "Got an unexpected keyword argument '%s'"
497
+ " to method lit_registry_service_update_lit_repository_metadata" % key
498
+ )
499
+ params[key] = val
500
+ del params['kwargs']
501
+ # verify the required parameter 'body' is set
502
+ if ('body' not in params or
503
+ params['body'] is None):
504
+ raise ValueError("Missing the required parameter `body` when calling `lit_registry_service_update_lit_repository_metadata`") # noqa: E501
505
+ # verify the required parameter 'project_id' is set
506
+ if ('project_id' not in params or
507
+ params['project_id'] is None):
508
+ raise ValueError("Missing the required parameter `project_id` when calling `lit_registry_service_update_lit_repository_metadata`") # noqa: E501
509
+ # verify the required parameter 'lit_repo_name' is set
510
+ if ('lit_repo_name' not in params or
511
+ params['lit_repo_name'] is None):
512
+ raise ValueError("Missing the required parameter `lit_repo_name` when calling `lit_registry_service_update_lit_repository_metadata`") # noqa: E501
513
+
514
+ collection_formats = {}
515
+
516
+ path_params = {}
517
+ if 'project_id' in params:
518
+ path_params['projectId'] = params['project_id'] # noqa: E501
519
+ if 'lit_repo_name' in params:
520
+ path_params['litRepoName'] = params['lit_repo_name'] # noqa: E501
521
+
522
+ query_params = []
523
+
524
+ header_params = {}
525
+
526
+ form_params = []
527
+ local_var_files = {}
528
+
529
+ body_params = None
530
+ if 'body' in params:
531
+ body_params = params['body']
532
+ # HTTP header `Accept`
533
+ header_params['Accept'] = self.api_client.select_header_accept(
534
+ ['application/json']) # noqa: E501
535
+
536
+ # HTTP header `Content-Type`
537
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
538
+ ['application/json']) # noqa: E501
539
+
540
+ # Authentication setting
541
+ auth_settings = [] # noqa: E501
542
+
543
+ return self.api_client.call_api(
544
+ '/v1/projects/{projectId}/lit-registry/{litRepoName}', 'PUT',
545
+ path_params,
546
+ query_params,
547
+ header_params,
548
+ body=body_params,
549
+ post_params=form_params,
550
+ files=local_var_files,
551
+ response_type='V1UpdateLitRepositoryResponse', # noqa: E501
552
+ auth_settings=auth_settings,
553
+ async_req=params.get('async_req'),
554
+ _return_http_data_only=params.get('_return_http_data_only'),
555
+ _preload_content=params.get('_preload_content', True),
556
+ _request_timeout=params.get('_request_timeout'),
557
+ collection_formats=collection_formats)
@@ -96,6 +96,7 @@ from lightning_sdk.lightning_cloud.openapi.models.jobs_id_body2 import JobsIdBod
96
96
  from lightning_sdk.lightning_cloud.openapi.models.jobs_id_body3 import JobsIdBody3
97
97
  from lightning_sdk.lightning_cloud.openapi.models.litloggermetrics_id_body import LitloggermetricsIdBody
98
98
  from lightning_sdk.lightning_cloud.openapi.models.litpages_id_body import LitpagesIdBody
99
+ from lightning_sdk.lightning_cloud.openapi.models.litregistry_lit_repo_name_body import LitregistryLitRepoNameBody
99
100
  from lightning_sdk.lightning_cloud.openapi.models.loggermetrics_id_body import LoggermetricsIdBody
100
101
  from lightning_sdk.lightning_cloud.openapi.models.metrics_stream_id_loggerartifacts_body import MetricsStreamIdLoggerartifactsBody
101
102
  from lightning_sdk.lightning_cloud.openapi.models.metricsstream_create_body import MetricsstreamCreateBody
@@ -609,6 +610,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_organization import V1Organ
609
610
  from lightning_sdk.lightning_cloud.openapi.models.v1_owner_type import V1OwnerType
610
611
  from lightning_sdk.lightning_cloud.openapi.models.v1_package_manager import V1PackageManager
611
612
  from lightning_sdk.lightning_cloud.openapi.models.v1_parameterization_spec import V1ParameterizationSpec
613
+ from lightning_sdk.lightning_cloud.openapi.models.v1_path_mapping import V1PathMapping
612
614
  from lightning_sdk.lightning_cloud.openapi.models.v1_path_telemetry import V1PathTelemetry
613
615
  from lightning_sdk.lightning_cloud.openapi.models.v1_phase_type import V1PhaseType
614
616
  from lightning_sdk.lightning_cloud.openapi.models.v1_plugin import V1Plugin
@@ -716,6 +718,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_accelerators
716
718
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_availability_request import V1UpdateClusterAvailabilityRequest
717
719
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_index_response import V1UpdateIndexResponse
718
720
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_lit_page_response import V1UpdateLitPageResponse
721
+ from lightning_sdk.lightning_cloud.openapi.models.v1_update_lit_repository_response import V1UpdateLitRepositoryResponse
719
722
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_metrics_stream_visibility_response import V1UpdateMetricsStreamVisibilityResponse
720
723
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_model_visibility_response import V1UpdateModelVisibilityResponse
721
724
  from lightning_sdk.lightning_cloud.openapi.models.v1_update_project_cluster_accelerators_response import V1UpdateProjectClusterAcceleratorsResponse
@@ -45,6 +45,7 @@ class DeploymentsIdBody(object):
45
45
  'autoscaling': 'V1AutoscalingSpec',
46
46
  'cloudspace_id': 'str',
47
47
  'created_at': 'datetime',
48
+ 'debug': 'bool',
48
49
  'desired_state': 'V1DeploymentState',
49
50
  'endpoint': 'V1Endpoint',
50
51
  'is_published': 'bool',
@@ -66,6 +67,7 @@ class DeploymentsIdBody(object):
66
67
  'autoscaling': 'autoscaling',
67
68
  'cloudspace_id': 'cloudspaceId',
68
69
  'created_at': 'createdAt',
70
+ 'debug': 'debug',
69
71
  'desired_state': 'desiredState',
70
72
  'endpoint': 'endpoint',
71
73
  'is_published': 'isPublished',
@@ -82,12 +84,13 @@ class DeploymentsIdBody(object):
82
84
  'user_id': 'userId'
83
85
  }
84
86
 
85
- def __init__(self, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, is_published: 'bool' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, template_id: 'str' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
87
+ def __init__(self, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, debug: 'bool' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, is_published: 'bool' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, template_id: 'str' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
86
88
  """DeploymentsIdBody - a model defined in Swagger""" # noqa: E501
87
89
  self._apis = None
88
90
  self._autoscaling = None
89
91
  self._cloudspace_id = None
90
92
  self._created_at = None
93
+ self._debug = None
91
94
  self._desired_state = None
92
95
  self._endpoint = None
93
96
  self._is_published = None
@@ -111,6 +114,8 @@ class DeploymentsIdBody(object):
111
114
  self.cloudspace_id = cloudspace_id
112
115
  if created_at is not None:
113
116
  self.created_at = created_at
117
+ if debug is not None:
118
+ self.debug = debug
114
119
  if desired_state is not None:
115
120
  self.desired_state = desired_state
116
121
  if endpoint is not None:
@@ -224,6 +229,27 @@ class DeploymentsIdBody(object):
224
229
 
225
230
  self._created_at = created_at
226
231
 
232
+ @property
233
+ def debug(self) -> 'bool':
234
+ """Gets the debug of this DeploymentsIdBody. # noqa: E501
235
+
236
+
237
+ :return: The debug of this DeploymentsIdBody. # noqa: E501
238
+ :rtype: bool
239
+ """
240
+ return self._debug
241
+
242
+ @debug.setter
243
+ def debug(self, debug: 'bool'):
244
+ """Sets the debug of this DeploymentsIdBody.
245
+
246
+
247
+ :param debug: The debug of this DeploymentsIdBody. # noqa: E501
248
+ :type: bool
249
+ """
250
+
251
+ self._debug = debug
252
+
227
253
  @property
228
254
  def desired_state(self) -> 'V1DeploymentState':
229
255
  """Gets the desired_state of this DeploymentsIdBody. # noqa: E501
@@ -0,0 +1,123 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ external/v1/auth_service.proto
5
+
6
+ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7
+
8
+ OpenAPI spec version: version not set
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+
12
+ NOTE
13
+ ----
14
+ standard swagger-codegen-cli for this python client has been modified
15
+ by custom templates. The purpose of these templates is to include
16
+ typing information in the API and Model code. Please refer to the
17
+ main grid repository for more info
18
+ """
19
+
20
+ import pprint
21
+ import re # noqa: F401
22
+
23
+ from typing import TYPE_CHECKING
24
+
25
+ import six
26
+
27
+ if TYPE_CHECKING:
28
+ from datetime import datetime
29
+ from lightning_sdk.lightning_cloud.openapi.models import *
30
+
31
+ class LitregistryLitRepoNameBody(object):
32
+ """NOTE: This class is auto generated by the swagger code generator program.
33
+
34
+ Do not edit the class manually.
35
+ """
36
+ """
37
+ Attributes:
38
+ swagger_types (dict): The key is attribute name
39
+ and the value is attribute type.
40
+ attribute_map (dict): The key is attribute name
41
+ and the value is json key in definition.
42
+ """
43
+ swagger_types = {
44
+ 'lit_repo_description': 'str'
45
+ }
46
+
47
+ attribute_map = {
48
+ 'lit_repo_description': 'litRepoDescription'
49
+ }
50
+
51
+ def __init__(self, lit_repo_description: 'str' =None): # noqa: E501
52
+ """LitregistryLitRepoNameBody - a model defined in Swagger""" # noqa: E501
53
+ self._lit_repo_description = None
54
+ self.discriminator = None
55
+ if lit_repo_description is not None:
56
+ self.lit_repo_description = lit_repo_description
57
+
58
+ @property
59
+ def lit_repo_description(self) -> 'str':
60
+ """Gets the lit_repo_description of this LitregistryLitRepoNameBody. # noqa: E501
61
+
62
+
63
+ :return: The lit_repo_description of this LitregistryLitRepoNameBody. # noqa: E501
64
+ :rtype: str
65
+ """
66
+ return self._lit_repo_description
67
+
68
+ @lit_repo_description.setter
69
+ def lit_repo_description(self, lit_repo_description: 'str'):
70
+ """Sets the lit_repo_description of this LitregistryLitRepoNameBody.
71
+
72
+
73
+ :param lit_repo_description: The lit_repo_description of this LitregistryLitRepoNameBody. # noqa: E501
74
+ :type: str
75
+ """
76
+
77
+ self._lit_repo_description = lit_repo_description
78
+
79
+ def to_dict(self) -> dict:
80
+ """Returns the model properties as a dict"""
81
+ result = {}
82
+
83
+ for attr, _ in six.iteritems(self.swagger_types):
84
+ value = getattr(self, attr)
85
+ if isinstance(value, list):
86
+ result[attr] = list(map(
87
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
88
+ value
89
+ ))
90
+ elif hasattr(value, "to_dict"):
91
+ result[attr] = value.to_dict()
92
+ elif isinstance(value, dict):
93
+ result[attr] = dict(map(
94
+ lambda item: (item[0], item[1].to_dict())
95
+ if hasattr(item[1], "to_dict") else item,
96
+ value.items()
97
+ ))
98
+ else:
99
+ result[attr] = value
100
+ if issubclass(LitregistryLitRepoNameBody, dict):
101
+ for key, value in self.items():
102
+ result[key] = value
103
+
104
+ return result
105
+
106
+ def to_str(self) -> str:
107
+ """Returns the string representation of the model"""
108
+ return pprint.pformat(self.to_dict())
109
+
110
+ def __repr__(self) -> str:
111
+ """For `print` and `pprint`"""
112
+ return self.to_str()
113
+
114
+ def __eq__(self, other: 'LitregistryLitRepoNameBody') -> bool:
115
+ """Returns true if both objects are equal"""
116
+ if not isinstance(other, LitregistryLitRepoNameBody):
117
+ return False
118
+
119
+ return self.__dict__ == other.__dict__
120
+
121
+ def __ne__(self, other: 'LitregistryLitRepoNameBody') -> bool:
122
+ """Returns true if both objects are not equal"""
123
+ return not self == other
@@ -51,6 +51,7 @@ class V1ClusterSpec(object):
51
51
  'google_cloud_v1': 'V1GoogleCloudDirectV1',
52
52
  'insurer_disabled': 'bool',
53
53
  'lambda_labs_v1': 'V1LambdaLabsDirectV1',
54
+ 'monitor_deletion_disabled': 'bool',
54
55
  'overprovisioning': 'list[V1InstanceOverprovisioningSpec]',
55
56
  'pause_automation': 'bool',
56
57
  'security_options': 'V1ClusterSecurityOptions',
@@ -71,6 +72,7 @@ class V1ClusterSpec(object):
71
72
  'google_cloud_v1': 'googleCloudV1',
72
73
  'insurer_disabled': 'insurerDisabled',
73
74
  'lambda_labs_v1': 'lambdaLabsV1',
75
+ 'monitor_deletion_disabled': 'monitorDeletionDisabled',
74
76
  'overprovisioning': 'overprovisioning',
75
77
  'pause_automation': 'pauseAutomation',
76
78
  'security_options': 'securityOptions',
@@ -80,7 +82,7 @@ class V1ClusterSpec(object):
80
82
  'vultr_v1': 'vultrV1'
81
83
  }
82
84
 
83
- def __init__(self, auth_token: 'str' =None, aws_v1: 'V1AWSDirectV1' =None, cluster_type: 'V1ClusterType' =None, deletion_options: 'V1ClusterDeletionOptions' =None, desired_state: 'V1ClusterState' =None, domain: 'str' =None, freeze_accelerators: 'bool' =None, google_cloud_v1: 'V1GoogleCloudDirectV1' =None, insurer_disabled: 'bool' =None, lambda_labs_v1: 'V1LambdaLabsDirectV1' =None, overprovisioning: 'list[V1InstanceOverprovisioningSpec]' =None, pause_automation: 'bool' =None, security_options: 'V1ClusterSecurityOptions' =None, slurm_v1: 'V1SlurmV1' =None, tagging_options: 'V1ClusterTaggingOptions' =None, user_id: 'str' =None, vultr_v1: 'V1VultrDirectV1' =None): # noqa: E501
85
+ def __init__(self, auth_token: 'str' =None, aws_v1: 'V1AWSDirectV1' =None, cluster_type: 'V1ClusterType' =None, deletion_options: 'V1ClusterDeletionOptions' =None, desired_state: 'V1ClusterState' =None, domain: 'str' =None, freeze_accelerators: 'bool' =None, google_cloud_v1: 'V1GoogleCloudDirectV1' =None, insurer_disabled: 'bool' =None, lambda_labs_v1: 'V1LambdaLabsDirectV1' =None, monitor_deletion_disabled: 'bool' =None, overprovisioning: 'list[V1InstanceOverprovisioningSpec]' =None, pause_automation: 'bool' =None, security_options: 'V1ClusterSecurityOptions' =None, slurm_v1: 'V1SlurmV1' =None, tagging_options: 'V1ClusterTaggingOptions' =None, user_id: 'str' =None, vultr_v1: 'V1VultrDirectV1' =None): # noqa: E501
84
86
  """V1ClusterSpec - a model defined in Swagger""" # noqa: E501
85
87
  self._auth_token = None
86
88
  self._aws_v1 = None
@@ -92,6 +94,7 @@ class V1ClusterSpec(object):
92
94
  self._google_cloud_v1 = None
93
95
  self._insurer_disabled = None
94
96
  self._lambda_labs_v1 = None
97
+ self._monitor_deletion_disabled = None
95
98
  self._overprovisioning = None
96
99
  self._pause_automation = None
97
100
  self._security_options = None
@@ -120,6 +123,8 @@ class V1ClusterSpec(object):
120
123
  self.insurer_disabled = insurer_disabled
121
124
  if lambda_labs_v1 is not None:
122
125
  self.lambda_labs_v1 = lambda_labs_v1
126
+ if monitor_deletion_disabled is not None:
127
+ self.monitor_deletion_disabled = monitor_deletion_disabled
123
128
  if overprovisioning is not None:
124
129
  self.overprovisioning = overprovisioning
125
130
  if pause_automation is not None:
@@ -347,6 +352,27 @@ class V1ClusterSpec(object):
347
352
 
348
353
  self._lambda_labs_v1 = lambda_labs_v1
349
354
 
355
+ @property
356
+ def monitor_deletion_disabled(self) -> 'bool':
357
+ """Gets the monitor_deletion_disabled of this V1ClusterSpec. # noqa: E501
358
+
359
+
360
+ :return: The monitor_deletion_disabled of this V1ClusterSpec. # noqa: E501
361
+ :rtype: bool
362
+ """
363
+ return self._monitor_deletion_disabled
364
+
365
+ @monitor_deletion_disabled.setter
366
+ def monitor_deletion_disabled(self, monitor_deletion_disabled: 'bool'):
367
+ """Sets the monitor_deletion_disabled of this V1ClusterSpec.
368
+
369
+
370
+ :param monitor_deletion_disabled: The monitor_deletion_disabled of this V1ClusterSpec. # noqa: E501
371
+ :type: bool
372
+ """
373
+
374
+ self._monitor_deletion_disabled = monitor_deletion_disabled
375
+
350
376
  @property
351
377
  def overprovisioning(self) -> 'list[V1InstanceOverprovisioningSpec]':
352
378
  """Gets the overprovisioning of this V1ClusterSpec. # noqa: E501
@@ -45,6 +45,7 @@ class V1Deployment(object):
45
45
  'autoscaling': 'V1AutoscalingSpec',
46
46
  'cloudspace_id': 'str',
47
47
  'created_at': 'datetime',
48
+ 'debug': 'bool',
48
49
  'desired_state': 'V1DeploymentState',
49
50
  'endpoint': 'V1Endpoint',
50
51
  'id': 'str',
@@ -68,6 +69,7 @@ class V1Deployment(object):
68
69
  'autoscaling': 'autoscaling',
69
70
  'cloudspace_id': 'cloudspaceId',
70
71
  'created_at': 'createdAt',
72
+ 'debug': 'debug',
71
73
  'desired_state': 'desiredState',
72
74
  'endpoint': 'endpoint',
73
75
  'id': 'id',
@@ -86,12 +88,13 @@ class V1Deployment(object):
86
88
  'user_id': 'userId'
87
89
  }
88
90
 
89
- def __init__(self, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, id: 'str' =None, is_published: 'bool' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, project_id: 'str' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, template_id: 'str' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
91
+ def __init__(self, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, debug: 'bool' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, id: 'str' =None, is_published: 'bool' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, project_id: 'str' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, template_id: 'str' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
90
92
  """V1Deployment - a model defined in Swagger""" # noqa: E501
91
93
  self._apis = None
92
94
  self._autoscaling = None
93
95
  self._cloudspace_id = None
94
96
  self._created_at = None
97
+ self._debug = None
95
98
  self._desired_state = None
96
99
  self._endpoint = None
97
100
  self._id = None
@@ -117,6 +120,8 @@ class V1Deployment(object):
117
120
  self.cloudspace_id = cloudspace_id
118
121
  if created_at is not None:
119
122
  self.created_at = created_at
123
+ if debug is not None:
124
+ self.debug = debug
120
125
  if desired_state is not None:
121
126
  self.desired_state = desired_state
122
127
  if endpoint is not None:
@@ -234,6 +239,27 @@ class V1Deployment(object):
234
239
 
235
240
  self._created_at = created_at
236
241
 
242
+ @property
243
+ def debug(self) -> 'bool':
244
+ """Gets the debug of this V1Deployment. # noqa: E501
245
+
246
+
247
+ :return: The debug of this V1Deployment. # noqa: E501
248
+ :rtype: bool
249
+ """
250
+ return self._debug
251
+
252
+ @debug.setter
253
+ def debug(self, debug: 'bool'):
254
+ """Sets the debug of this V1Deployment.
255
+
256
+
257
+ :param debug: The debug of this V1Deployment. # noqa: E501
258
+ :type: bool
259
+ """
260
+
261
+ self._debug = debug
262
+
237
263
  @property
238
264
  def desired_state(self) -> 'V1DeploymentState':
239
265
  """Gets the desired_state of this V1Deployment. # noqa: E501