lightning-sdk 0.1.40__py3-none-any.whl → 0.1.42__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.
- lightning_sdk/__init__.py +1 -1
- lightning_sdk/ai_hub.py +8 -3
- lightning_sdk/api/ai_hub_api.py +3 -3
- lightning_sdk/api/deployment_api.py +6 -6
- lightning_sdk/api/job_api.py +32 -6
- lightning_sdk/api/mmt_api.py +60 -19
- lightning_sdk/api/studio_api.py +37 -19
- lightning_sdk/api/teamspace_api.py +34 -29
- lightning_sdk/api/utils.py +48 -35
- lightning_sdk/cli/ai_hub.py +3 -3
- lightning_sdk/cli/entrypoint.py +3 -1
- lightning_sdk/cli/mmt.py +11 -10
- lightning_sdk/cli/run.py +9 -8
- lightning_sdk/cli/serve.py +130 -0
- lightning_sdk/deployment/deployment.py +18 -12
- lightning_sdk/job/base.py +118 -24
- lightning_sdk/job/job.py +87 -9
- lightning_sdk/job/v1.py +75 -18
- lightning_sdk/job/v2.py +51 -15
- lightning_sdk/job/work.py +36 -7
- lightning_sdk/lightning_cloud/openapi/__init__.py +13 -0
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +215 -5
- lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py +218 -0
- lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +226 -0
- lightning_sdk/lightning_cloud/openapi/api/secret_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/snowflake_service_api.py +21 -1
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +13 -0
- lightning_sdk/lightning_cloud/openapi/models/create_deployment_request_defines_a_spec_for_the_job_that_allows_for_autoscaling_jobs.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/deploymenttemplates_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/id_visibility_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/model_id_versions_body.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/project_id_multimachinejobs_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/project_id_snowflake_body.py +15 -67
- lightning_sdk/lightning_cloud/openapi/models/query_query_id_body.py +17 -69
- lightning_sdk/lightning_cloud/openapi/models/snowflake_export_body.py +29 -81
- lightning_sdk/lightning_cloud/openapi/models/snowflake_query_body.py +17 -69
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_api.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_model_file_url_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_response.py +17 -17
- lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_url_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_project_balance_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_header.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_list_multi_machine_job_events_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_model_file.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_event.py +331 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_event_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_fault_tolerance.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_fault_tolerance_strategy.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +2 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_secret_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_snowflake_data_connection.py +29 -81
- lightning_sdk/lightning_cloud/openapi/models/v1_system_metrics.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_trainium_system_metrics.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_metrics_stream_visibility_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +41 -67
- lightning_sdk/lightning_cloud/openapi/models/v1_validate_deployment_image_request.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_validate_deployment_image_response.py +97 -0
- lightning_sdk/lightning_cloud/rest_client.py +2 -0
- lightning_sdk/mmt/__init__.py +3 -0
- lightning_sdk/{_mmt → mmt}/base.py +20 -14
- lightning_sdk/{_mmt → mmt}/mmt.py +46 -17
- lightning_sdk/mmt/v1.py +129 -0
- lightning_sdk/{_mmt → mmt}/v2.py +16 -21
- lightning_sdk/plugin.py +43 -16
- lightning_sdk/services/file_endpoint.py +11 -5
- lightning_sdk/studio.py +16 -9
- lightning_sdk/teamspace.py +26 -14
- lightning_sdk/utils/resolve.py +18 -0
- {lightning_sdk-0.1.40.dist-info → lightning_sdk-0.1.42.dist-info}/METADATA +3 -1
- {lightning_sdk-0.1.40.dist-info → lightning_sdk-0.1.42.dist-info}/RECORD +80 -66
- lightning_sdk/_mmt/__init__.py +0 -3
- lightning_sdk/_mmt/v1.py +0 -69
- {lightning_sdk-0.1.40.dist-info → lightning_sdk-0.1.42.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.1.40.dist-info → lightning_sdk-0.1.42.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.1.40.dist-info → lightning_sdk-0.1.42.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.1.40.dist-info → lightning_sdk-0.1.42.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
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 V1GetModelFilesUrlResponse(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
|
+
'files': 'list[V1ModelFile]',
|
|
45
|
+
'offset': 'str'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'files': 'files',
|
|
50
|
+
'offset': 'offset'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, files: 'list[V1ModelFile]' =None, offset: 'str' =None): # noqa: E501
|
|
54
|
+
"""V1GetModelFilesUrlResponse - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._files = None
|
|
56
|
+
self._offset = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if files is not None:
|
|
59
|
+
self.files = files
|
|
60
|
+
if offset is not None:
|
|
61
|
+
self.offset = offset
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def files(self) -> 'list[V1ModelFile]':
|
|
65
|
+
"""Gets the files of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The files of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
69
|
+
:rtype: list[V1ModelFile]
|
|
70
|
+
"""
|
|
71
|
+
return self._files
|
|
72
|
+
|
|
73
|
+
@files.setter
|
|
74
|
+
def files(self, files: 'list[V1ModelFile]'):
|
|
75
|
+
"""Sets the files of this V1GetModelFilesUrlResponse.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param files: The files of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
79
|
+
:type: list[V1ModelFile]
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._files = files
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def offset(self) -> 'str':
|
|
86
|
+
"""Gets the offset of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The offset of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
90
|
+
:rtype: str
|
|
91
|
+
"""
|
|
92
|
+
return self._offset
|
|
93
|
+
|
|
94
|
+
@offset.setter
|
|
95
|
+
def offset(self, offset: 'str'):
|
|
96
|
+
"""Sets the offset of this V1GetModelFilesUrlResponse.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param offset: The offset of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
100
|
+
:type: str
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._offset = offset
|
|
104
|
+
|
|
105
|
+
def to_dict(self) -> dict:
|
|
106
|
+
"""Returns the model properties as a dict"""
|
|
107
|
+
result = {}
|
|
108
|
+
|
|
109
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
110
|
+
value = getattr(self, attr)
|
|
111
|
+
if isinstance(value, list):
|
|
112
|
+
result[attr] = list(map(
|
|
113
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
114
|
+
value
|
|
115
|
+
))
|
|
116
|
+
elif hasattr(value, "to_dict"):
|
|
117
|
+
result[attr] = value.to_dict()
|
|
118
|
+
elif isinstance(value, dict):
|
|
119
|
+
result[attr] = dict(map(
|
|
120
|
+
lambda item: (item[0], item[1].to_dict())
|
|
121
|
+
if hasattr(item[1], "to_dict") else item,
|
|
122
|
+
value.items()
|
|
123
|
+
))
|
|
124
|
+
else:
|
|
125
|
+
result[attr] = value
|
|
126
|
+
if issubclass(V1GetModelFilesUrlResponse, dict):
|
|
127
|
+
for key, value in self.items():
|
|
128
|
+
result[key] = value
|
|
129
|
+
|
|
130
|
+
return result
|
|
131
|
+
|
|
132
|
+
def to_str(self) -> str:
|
|
133
|
+
"""Returns the string representation of the model"""
|
|
134
|
+
return pprint.pformat(self.to_dict())
|
|
135
|
+
|
|
136
|
+
def __repr__(self) -> str:
|
|
137
|
+
"""For `print` and `pprint`"""
|
|
138
|
+
return self.to_str()
|
|
139
|
+
|
|
140
|
+
def __eq__(self, other: 'V1GetModelFilesUrlResponse') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, V1GetModelFilesUrlResponse):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'V1GetModelFilesUrlResponse') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|
|
@@ -43,6 +43,7 @@ class V1GetProjectBalanceResponse(object):
|
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'account_id': 'str',
|
|
45
45
|
'balance': 'float',
|
|
46
|
+
'next_free_credits_grant_at': 'datetime',
|
|
46
47
|
'project_id': 'str',
|
|
47
48
|
'transactions': 'list[V1Transaction]'
|
|
48
49
|
}
|
|
@@ -50,14 +51,16 @@ class V1GetProjectBalanceResponse(object):
|
|
|
50
51
|
attribute_map = {
|
|
51
52
|
'account_id': 'accountId',
|
|
52
53
|
'balance': 'balance',
|
|
54
|
+
'next_free_credits_grant_at': 'nextFreeCreditsGrantAt',
|
|
53
55
|
'project_id': 'projectId',
|
|
54
56
|
'transactions': 'transactions'
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
def __init__(self, account_id: 'str' =None, balance: 'float' =None, project_id: 'str' =None, transactions: 'list[V1Transaction]' =None): # noqa: E501
|
|
59
|
+
def __init__(self, account_id: 'str' =None, balance: 'float' =None, next_free_credits_grant_at: 'datetime' =None, project_id: 'str' =None, transactions: 'list[V1Transaction]' =None): # noqa: E501
|
|
58
60
|
"""V1GetProjectBalanceResponse - a model defined in Swagger""" # noqa: E501
|
|
59
61
|
self._account_id = None
|
|
60
62
|
self._balance = None
|
|
63
|
+
self._next_free_credits_grant_at = None
|
|
61
64
|
self._project_id = None
|
|
62
65
|
self._transactions = None
|
|
63
66
|
self.discriminator = None
|
|
@@ -65,6 +68,8 @@ class V1GetProjectBalanceResponse(object):
|
|
|
65
68
|
self.account_id = account_id
|
|
66
69
|
if balance is not None:
|
|
67
70
|
self.balance = balance
|
|
71
|
+
if next_free_credits_grant_at is not None:
|
|
72
|
+
self.next_free_credits_grant_at = next_free_credits_grant_at
|
|
68
73
|
if project_id is not None:
|
|
69
74
|
self.project_id = project_id
|
|
70
75
|
if transactions is not None:
|
|
@@ -112,6 +117,27 @@ class V1GetProjectBalanceResponse(object):
|
|
|
112
117
|
|
|
113
118
|
self._balance = balance
|
|
114
119
|
|
|
120
|
+
@property
|
|
121
|
+
def next_free_credits_grant_at(self) -> 'datetime':
|
|
122
|
+
"""Gets the next_free_credits_grant_at of this V1GetProjectBalanceResponse. # noqa: E501
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
:return: The next_free_credits_grant_at of this V1GetProjectBalanceResponse. # noqa: E501
|
|
126
|
+
:rtype: datetime
|
|
127
|
+
"""
|
|
128
|
+
return self._next_free_credits_grant_at
|
|
129
|
+
|
|
130
|
+
@next_free_credits_grant_at.setter
|
|
131
|
+
def next_free_credits_grant_at(self, next_free_credits_grant_at: 'datetime'):
|
|
132
|
+
"""Sets the next_free_credits_grant_at of this V1GetProjectBalanceResponse.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
:param next_free_credits_grant_at: The next_free_credits_grant_at of this V1GetProjectBalanceResponse. # noqa: E501
|
|
136
|
+
:type: datetime
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
self._next_free_credits_grant_at = next_free_credits_grant_at
|
|
140
|
+
|
|
115
141
|
@property
|
|
116
142
|
def project_id(self) -> 'str':
|
|
117
143
|
"""Gets the project_id of this V1GetProjectBalanceResponse. # noqa: E501
|
|
@@ -0,0 +1,175 @@
|
|
|
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 V1Header(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
|
+
'description': 'str',
|
|
45
|
+
'key': 'str',
|
|
46
|
+
'value': 'str'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
attribute_map = {
|
|
50
|
+
'description': 'description',
|
|
51
|
+
'key': 'key',
|
|
52
|
+
'value': 'value'
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
def __init__(self, description: 'str' =None, key: 'str' =None, value: 'str' =None): # noqa: E501
|
|
56
|
+
"""V1Header - a model defined in Swagger""" # noqa: E501
|
|
57
|
+
self._description = None
|
|
58
|
+
self._key = None
|
|
59
|
+
self._value = None
|
|
60
|
+
self.discriminator = None
|
|
61
|
+
if description is not None:
|
|
62
|
+
self.description = description
|
|
63
|
+
if key is not None:
|
|
64
|
+
self.key = key
|
|
65
|
+
if value is not None:
|
|
66
|
+
self.value = value
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def description(self) -> 'str':
|
|
70
|
+
"""Gets the description of this V1Header. # noqa: E501
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:return: The description of this V1Header. # noqa: E501
|
|
74
|
+
:rtype: str
|
|
75
|
+
"""
|
|
76
|
+
return self._description
|
|
77
|
+
|
|
78
|
+
@description.setter
|
|
79
|
+
def description(self, description: 'str'):
|
|
80
|
+
"""Sets the description of this V1Header.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
:param description: The description of this V1Header. # noqa: E501
|
|
84
|
+
:type: str
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
self._description = description
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def key(self) -> 'str':
|
|
91
|
+
"""Gets the key of this V1Header. # noqa: E501
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
:return: The key of this V1Header. # noqa: E501
|
|
95
|
+
:rtype: str
|
|
96
|
+
"""
|
|
97
|
+
return self._key
|
|
98
|
+
|
|
99
|
+
@key.setter
|
|
100
|
+
def key(self, key: 'str'):
|
|
101
|
+
"""Sets the key of this V1Header.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
:param key: The key of this V1Header. # noqa: E501
|
|
105
|
+
:type: str
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
self._key = key
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def value(self) -> 'str':
|
|
112
|
+
"""Gets the value of this V1Header. # noqa: E501
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
:return: The value of this V1Header. # noqa: E501
|
|
116
|
+
:rtype: str
|
|
117
|
+
"""
|
|
118
|
+
return self._value
|
|
119
|
+
|
|
120
|
+
@value.setter
|
|
121
|
+
def value(self, value: 'str'):
|
|
122
|
+
"""Sets the value of this V1Header.
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
:param value: The value of this V1Header. # noqa: E501
|
|
126
|
+
:type: str
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
self._value = value
|
|
130
|
+
|
|
131
|
+
def to_dict(self) -> dict:
|
|
132
|
+
"""Returns the model properties as a dict"""
|
|
133
|
+
result = {}
|
|
134
|
+
|
|
135
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
136
|
+
value = getattr(self, attr)
|
|
137
|
+
if isinstance(value, list):
|
|
138
|
+
result[attr] = list(map(
|
|
139
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
140
|
+
value
|
|
141
|
+
))
|
|
142
|
+
elif hasattr(value, "to_dict"):
|
|
143
|
+
result[attr] = value.to_dict()
|
|
144
|
+
elif isinstance(value, dict):
|
|
145
|
+
result[attr] = dict(map(
|
|
146
|
+
lambda item: (item[0], item[1].to_dict())
|
|
147
|
+
if hasattr(item[1], "to_dict") else item,
|
|
148
|
+
value.items()
|
|
149
|
+
))
|
|
150
|
+
else:
|
|
151
|
+
result[attr] = value
|
|
152
|
+
if issubclass(V1Header, dict):
|
|
153
|
+
for key, value in self.items():
|
|
154
|
+
result[key] = value
|
|
155
|
+
|
|
156
|
+
return result
|
|
157
|
+
|
|
158
|
+
def to_str(self) -> str:
|
|
159
|
+
"""Returns the string representation of the model"""
|
|
160
|
+
return pprint.pformat(self.to_dict())
|
|
161
|
+
|
|
162
|
+
def __repr__(self) -> str:
|
|
163
|
+
"""For `print` and `pprint`"""
|
|
164
|
+
return self.to_str()
|
|
165
|
+
|
|
166
|
+
def __eq__(self, other: 'V1Header') -> bool:
|
|
167
|
+
"""Returns true if both objects are equal"""
|
|
168
|
+
if not isinstance(other, V1Header):
|
|
169
|
+
return False
|
|
170
|
+
|
|
171
|
+
return self.__dict__ == other.__dict__
|
|
172
|
+
|
|
173
|
+
def __ne__(self, other: 'V1Header') -> bool:
|
|
174
|
+
"""Returns true if both objects are not equal"""
|
|
175
|
+
return not self == other
|
|
@@ -57,6 +57,7 @@ class V1JobSpec(object):
|
|
|
57
57
|
'instance_type': 'str',
|
|
58
58
|
'modified_volume': 'bool',
|
|
59
59
|
'readiness_probe': 'V1JobHealthCheckConfig',
|
|
60
|
+
'regions': 'list[str]',
|
|
60
61
|
'resources': 'V1Resources',
|
|
61
62
|
'restart_policy': 'str',
|
|
62
63
|
'run_id': 'str',
|
|
@@ -81,6 +82,7 @@ class V1JobSpec(object):
|
|
|
81
82
|
'instance_type': 'instanceType',
|
|
82
83
|
'modified_volume': 'modifiedVolume',
|
|
83
84
|
'readiness_probe': 'readinessProbe',
|
|
85
|
+
'regions': 'regions',
|
|
84
86
|
'resources': 'resources',
|
|
85
87
|
'restart_policy': 'restartPolicy',
|
|
86
88
|
'run_id': 'runId',
|
|
@@ -88,7 +90,7 @@ class V1JobSpec(object):
|
|
|
88
90
|
'volumes': 'volumes'
|
|
89
91
|
}
|
|
90
92
|
|
|
91
|
-
def __init__(self, artifacts_destination: 'str' =None, artifacts_source: 'str' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, command: 'str' =None, data_paths: 'list[V1DataPath]' =None, entrypoint: 'str' =None, env: 'list[V1EnvVar]' =None, image: 'str' =None, image_cluster_credentials: 'bool' =None, image_secret_ref: 'str' =None, include_credentials: 'bool' =None, instance_name: 'str' =None, instance_type: 'str' =None, modified_volume: 'bool' =None, readiness_probe: 'V1JobHealthCheckConfig' =None, resources: 'V1Resources' =None, restart_policy: 'str' =None, run_id: 'str' =None, spot: 'bool' =None, volumes: 'list[V1Volume]' =None): # noqa: E501
|
|
93
|
+
def __init__(self, artifacts_destination: 'str' =None, artifacts_source: 'str' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, command: 'str' =None, data_paths: 'list[V1DataPath]' =None, entrypoint: 'str' =None, env: 'list[V1EnvVar]' =None, image: 'str' =None, image_cluster_credentials: 'bool' =None, image_secret_ref: 'str' =None, include_credentials: 'bool' =None, instance_name: 'str' =None, instance_type: 'str' =None, modified_volume: 'bool' =None, readiness_probe: 'V1JobHealthCheckConfig' =None, regions: 'list[str]' =None, resources: 'V1Resources' =None, restart_policy: 'str' =None, run_id: 'str' =None, spot: 'bool' =None, volumes: 'list[V1Volume]' =None): # noqa: E501
|
|
92
94
|
"""V1JobSpec - a model defined in Swagger""" # noqa: E501
|
|
93
95
|
self._artifacts_destination = None
|
|
94
96
|
self._artifacts_source = None
|
|
@@ -106,6 +108,7 @@ class V1JobSpec(object):
|
|
|
106
108
|
self._instance_type = None
|
|
107
109
|
self._modified_volume = None
|
|
108
110
|
self._readiness_probe = None
|
|
111
|
+
self._regions = None
|
|
109
112
|
self._resources = None
|
|
110
113
|
self._restart_policy = None
|
|
111
114
|
self._run_id = None
|
|
@@ -144,6 +147,8 @@ class V1JobSpec(object):
|
|
|
144
147
|
self.modified_volume = modified_volume
|
|
145
148
|
if readiness_probe is not None:
|
|
146
149
|
self.readiness_probe = readiness_probe
|
|
150
|
+
if regions is not None:
|
|
151
|
+
self.regions = regions
|
|
147
152
|
if resources is not None:
|
|
148
153
|
self.resources = resources
|
|
149
154
|
if restart_policy is not None:
|
|
@@ -491,6 +496,27 @@ class V1JobSpec(object):
|
|
|
491
496
|
|
|
492
497
|
self._readiness_probe = readiness_probe
|
|
493
498
|
|
|
499
|
+
@property
|
|
500
|
+
def regions(self) -> 'list[str]':
|
|
501
|
+
"""Gets the regions of this V1JobSpec. # noqa: E501
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
:return: The regions of this V1JobSpec. # noqa: E501
|
|
505
|
+
:rtype: list[str]
|
|
506
|
+
"""
|
|
507
|
+
return self._regions
|
|
508
|
+
|
|
509
|
+
@regions.setter
|
|
510
|
+
def regions(self, regions: 'list[str]'):
|
|
511
|
+
"""Sets the regions of this V1JobSpec.
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
:param regions: The regions of this V1JobSpec. # noqa: E501
|
|
515
|
+
:type: list[str]
|
|
516
|
+
"""
|
|
517
|
+
|
|
518
|
+
self._regions = regions
|
|
519
|
+
|
|
494
520
|
@property
|
|
495
521
|
def resources(self) -> 'V1Resources':
|
|
496
522
|
"""Gets the resources of this V1JobSpec. # 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 V1ListMultiMachineJobEventsResponse(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
|
+
'events': 'list[V1MultiMachineJobEvent]'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'events': 'events'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, events: 'list[V1MultiMachineJobEvent]' =None): # noqa: E501
|
|
52
|
+
"""V1ListMultiMachineJobEventsResponse - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._events = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if events is not None:
|
|
56
|
+
self.events = events
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def events(self) -> 'list[V1MultiMachineJobEvent]':
|
|
60
|
+
"""Gets the events of this V1ListMultiMachineJobEventsResponse. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The events of this V1ListMultiMachineJobEventsResponse. # noqa: E501
|
|
64
|
+
:rtype: list[V1MultiMachineJobEvent]
|
|
65
|
+
"""
|
|
66
|
+
return self._events
|
|
67
|
+
|
|
68
|
+
@events.setter
|
|
69
|
+
def events(self, events: 'list[V1MultiMachineJobEvent]'):
|
|
70
|
+
"""Sets the events of this V1ListMultiMachineJobEventsResponse.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param events: The events of this V1ListMultiMachineJobEventsResponse. # noqa: E501
|
|
74
|
+
:type: list[V1MultiMachineJobEvent]
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._events = events
|
|
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(V1ListMultiMachineJobEventsResponse, 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: 'V1ListMultiMachineJobEventsResponse') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, V1ListMultiMachineJobEventsResponse):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'V1ListMultiMachineJobEventsResponse') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|
|
@@ -47,7 +47,8 @@ class V1ManagedModel(object):
|
|
|
47
47
|
'endpoint_id': 'str',
|
|
48
48
|
'id': 'str',
|
|
49
49
|
'name': 'str',
|
|
50
|
-
'prompt_token_price': 'float'
|
|
50
|
+
'prompt_token_price': 'float',
|
|
51
|
+
'status': 'V1AssistantModelStatus'
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
attribute_map = {
|
|
@@ -57,10 +58,11 @@ class V1ManagedModel(object):
|
|
|
57
58
|
'endpoint_id': 'endpointId',
|
|
58
59
|
'id': 'id',
|
|
59
60
|
'name': 'name',
|
|
60
|
-
'prompt_token_price': 'promptTokenPrice'
|
|
61
|
+
'prompt_token_price': 'promptTokenPrice',
|
|
62
|
+
'status': 'status'
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
def __init__(self, abilities: 'V1ManagedModelAbilities' =None, completion_token_price: 'float' =None, description: 'str' =None, endpoint_id: 'str' =None, id: 'str' =None, name: 'str' =None, prompt_token_price: 'float' =None): # noqa: E501
|
|
65
|
+
def __init__(self, abilities: 'V1ManagedModelAbilities' =None, completion_token_price: 'float' =None, description: 'str' =None, endpoint_id: 'str' =None, id: 'str' =None, name: 'str' =None, prompt_token_price: 'float' =None, status: 'V1AssistantModelStatus' =None): # noqa: E501
|
|
64
66
|
"""V1ManagedModel - a model defined in Swagger""" # noqa: E501
|
|
65
67
|
self._abilities = None
|
|
66
68
|
self._completion_token_price = None
|
|
@@ -69,6 +71,7 @@ class V1ManagedModel(object):
|
|
|
69
71
|
self._id = None
|
|
70
72
|
self._name = None
|
|
71
73
|
self._prompt_token_price = None
|
|
74
|
+
self._status = None
|
|
72
75
|
self.discriminator = None
|
|
73
76
|
if abilities is not None:
|
|
74
77
|
self.abilities = abilities
|
|
@@ -84,6 +87,8 @@ class V1ManagedModel(object):
|
|
|
84
87
|
self.name = name
|
|
85
88
|
if prompt_token_price is not None:
|
|
86
89
|
self.prompt_token_price = prompt_token_price
|
|
90
|
+
if status is not None:
|
|
91
|
+
self.status = status
|
|
87
92
|
|
|
88
93
|
@property
|
|
89
94
|
def abilities(self) -> 'V1ManagedModelAbilities':
|
|
@@ -232,6 +237,27 @@ class V1ManagedModel(object):
|
|
|
232
237
|
|
|
233
238
|
self._prompt_token_price = prompt_token_price
|
|
234
239
|
|
|
240
|
+
@property
|
|
241
|
+
def status(self) -> 'V1AssistantModelStatus':
|
|
242
|
+
"""Gets the status of this V1ManagedModel. # noqa: E501
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
:return: The status of this V1ManagedModel. # noqa: E501
|
|
246
|
+
:rtype: V1AssistantModelStatus
|
|
247
|
+
"""
|
|
248
|
+
return self._status
|
|
249
|
+
|
|
250
|
+
@status.setter
|
|
251
|
+
def status(self, status: 'V1AssistantModelStatus'):
|
|
252
|
+
"""Sets the status of this V1ManagedModel.
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
:param status: The status of this V1ManagedModel. # noqa: E501
|
|
256
|
+
:type: V1AssistantModelStatus
|
|
257
|
+
"""
|
|
258
|
+
|
|
259
|
+
self._status = status
|
|
260
|
+
|
|
235
261
|
def to_dict(self) -> dict:
|
|
236
262
|
"""Returns the model properties as a dict"""
|
|
237
263
|
result = {}
|