lightning-sdk 2025.8.6rc2__py3-none-any.whl → 2025.8.8__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/cli/clusters_menu.py +9 -6
- lightning_sdk/cli/deploy/serve.py +17 -6
- lightning_sdk/cli/download.py +2 -2
- lightning_sdk/cli/list.py +2 -3
- lightning_sdk/lightning_cloud/openapi/__init__.py +3 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +110 -1
- lightning_sdk/lightning_cloud/openapi/api/schedules_service_api.py +347 -0
- lightning_sdk/lightning_cloud/openapi/configuration.py +3 -19
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +3 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_metrics_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_metrics.py +877 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_schedule_runs_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_node_metrics.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_schedule_run.py +357 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -1
- lightning_sdk/llm/llm.py +15 -10
- lightning_sdk/llm/public_assistants.py +40 -7
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.8.8.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.8.8.dist-info}/RECORD +24 -21
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.8.8.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.8.8.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.8.8.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.8.8.dist-info}/top_level.txt +0 -0
|
@@ -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 V1ListScheduleRunsResponse(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
|
+
'schedule_runs': 'list[V1ScheduleRun]'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'schedule_runs': 'scheduleRuns'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, schedule_runs: 'list[V1ScheduleRun]' =None): # noqa: E501
|
|
52
|
+
"""V1ListScheduleRunsResponse - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._schedule_runs = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if schedule_runs is not None:
|
|
56
|
+
self.schedule_runs = schedule_runs
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def schedule_runs(self) -> 'list[V1ScheduleRun]':
|
|
60
|
+
"""Gets the schedule_runs of this V1ListScheduleRunsResponse. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The schedule_runs of this V1ListScheduleRunsResponse. # noqa: E501
|
|
64
|
+
:rtype: list[V1ScheduleRun]
|
|
65
|
+
"""
|
|
66
|
+
return self._schedule_runs
|
|
67
|
+
|
|
68
|
+
@schedule_runs.setter
|
|
69
|
+
def schedule_runs(self, schedule_runs: 'list[V1ScheduleRun]'):
|
|
70
|
+
"""Sets the schedule_runs of this V1ListScheduleRunsResponse.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param schedule_runs: The schedule_runs of this V1ListScheduleRunsResponse. # noqa: E501
|
|
74
|
+
:type: list[V1ScheduleRun]
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._schedule_runs = schedule_runs
|
|
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(V1ListScheduleRunsResponse, 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: 'V1ListScheduleRunsResponse') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, V1ListScheduleRunsResponse):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'V1ListScheduleRunsResponse') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|
|
@@ -44,6 +44,8 @@ class V1NodeMetrics(object):
|
|
|
44
44
|
'cpu_capacity_cores': 'float',
|
|
45
45
|
'cpu_util': 'float',
|
|
46
46
|
'filesystem': 'dict(str, V1FilesystemMetrics)',
|
|
47
|
+
'mem_total': 'float',
|
|
48
|
+
'mem_util': 'float',
|
|
47
49
|
'node_name': 'str',
|
|
48
50
|
'per_gpu_mem_free': 'dict(str, float)',
|
|
49
51
|
'per_gpu_mem_used': 'dict(str, float)',
|
|
@@ -57,6 +59,8 @@ class V1NodeMetrics(object):
|
|
|
57
59
|
'cpu_capacity_cores': 'cpuCapacityCores',
|
|
58
60
|
'cpu_util': 'cpuUtil',
|
|
59
61
|
'filesystem': 'filesystem',
|
|
62
|
+
'mem_total': 'memTotal',
|
|
63
|
+
'mem_util': 'memUtil',
|
|
60
64
|
'node_name': 'nodeName',
|
|
61
65
|
'per_gpu_mem_free': 'perGpuMemFree',
|
|
62
66
|
'per_gpu_mem_used': 'perGpuMemUsed',
|
|
@@ -66,11 +70,13 @@ class V1NodeMetrics(object):
|
|
|
66
70
|
'timestamp': 'timestamp'
|
|
67
71
|
}
|
|
68
72
|
|
|
69
|
-
def __init__(self, cpu_capacity_cores: 'float' =None, cpu_util: 'float' =None, filesystem: 'dict(str, V1FilesystemMetrics)' =None, node_name: 'str' =None, per_gpu_mem_free: 'dict(str, float)' =None, per_gpu_mem_used: 'dict(str, float)' =None, per_gpu_power_usage_watts: 'dict(str, float)' =None, per_gpu_temperature_c: 'dict(str, float)' =None, per_gpu_util: 'dict(str, float)' =None, timestamp: 'datetime' =None): # noqa: E501
|
|
73
|
+
def __init__(self, cpu_capacity_cores: 'float' =None, cpu_util: 'float' =None, filesystem: 'dict(str, V1FilesystemMetrics)' =None, mem_total: 'float' =None, mem_util: 'float' =None, node_name: 'str' =None, per_gpu_mem_free: 'dict(str, float)' =None, per_gpu_mem_used: 'dict(str, float)' =None, per_gpu_power_usage_watts: 'dict(str, float)' =None, per_gpu_temperature_c: 'dict(str, float)' =None, per_gpu_util: 'dict(str, float)' =None, timestamp: 'datetime' =None): # noqa: E501
|
|
70
74
|
"""V1NodeMetrics - a model defined in Swagger""" # noqa: E501
|
|
71
75
|
self._cpu_capacity_cores = None
|
|
72
76
|
self._cpu_util = None
|
|
73
77
|
self._filesystem = None
|
|
78
|
+
self._mem_total = None
|
|
79
|
+
self._mem_util = None
|
|
74
80
|
self._node_name = None
|
|
75
81
|
self._per_gpu_mem_free = None
|
|
76
82
|
self._per_gpu_mem_used = None
|
|
@@ -85,6 +91,10 @@ class V1NodeMetrics(object):
|
|
|
85
91
|
self.cpu_util = cpu_util
|
|
86
92
|
if filesystem is not None:
|
|
87
93
|
self.filesystem = filesystem
|
|
94
|
+
if mem_total is not None:
|
|
95
|
+
self.mem_total = mem_total
|
|
96
|
+
if mem_util is not None:
|
|
97
|
+
self.mem_util = mem_util
|
|
88
98
|
if node_name is not None:
|
|
89
99
|
self.node_name = node_name
|
|
90
100
|
if per_gpu_mem_free is not None:
|
|
@@ -163,6 +173,48 @@ class V1NodeMetrics(object):
|
|
|
163
173
|
|
|
164
174
|
self._filesystem = filesystem
|
|
165
175
|
|
|
176
|
+
@property
|
|
177
|
+
def mem_total(self) -> 'float':
|
|
178
|
+
"""Gets the mem_total of this V1NodeMetrics. # noqa: E501
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
:return: The mem_total of this V1NodeMetrics. # noqa: E501
|
|
182
|
+
:rtype: float
|
|
183
|
+
"""
|
|
184
|
+
return self._mem_total
|
|
185
|
+
|
|
186
|
+
@mem_total.setter
|
|
187
|
+
def mem_total(self, mem_total: 'float'):
|
|
188
|
+
"""Sets the mem_total of this V1NodeMetrics.
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
:param mem_total: The mem_total of this V1NodeMetrics. # noqa: E501
|
|
192
|
+
:type: float
|
|
193
|
+
"""
|
|
194
|
+
|
|
195
|
+
self._mem_total = mem_total
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def mem_util(self) -> 'float':
|
|
199
|
+
"""Gets the mem_util of this V1NodeMetrics. # noqa: E501
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
:return: The mem_util of this V1NodeMetrics. # noqa: E501
|
|
203
|
+
:rtype: float
|
|
204
|
+
"""
|
|
205
|
+
return self._mem_util
|
|
206
|
+
|
|
207
|
+
@mem_util.setter
|
|
208
|
+
def mem_util(self, mem_util: 'float'):
|
|
209
|
+
"""Sets the mem_util of this V1NodeMetrics.
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
:param mem_util: The mem_util of this V1NodeMetrics. # noqa: E501
|
|
213
|
+
:type: float
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
self._mem_util = mem_util
|
|
217
|
+
|
|
166
218
|
@property
|
|
167
219
|
def node_name(self) -> 'str':
|
|
168
220
|
"""Gets the node_name of this V1NodeMetrics. # noqa: E501
|
|
@@ -0,0 +1,357 @@
|
|
|
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 V1ScheduleRun(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
|
+
'action_type': 'V1ScheduleActionType',
|
|
45
|
+
'command': 'str',
|
|
46
|
+
'created_at': 'datetime',
|
|
47
|
+
'id': 'str',
|
|
48
|
+
'output': 'str',
|
|
49
|
+
'project_id': 'str',
|
|
50
|
+
'resource_id': 'str',
|
|
51
|
+
'schedule_id': 'str',
|
|
52
|
+
'state': 'str',
|
|
53
|
+
'stopped_at': 'datetime'
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
attribute_map = {
|
|
57
|
+
'action_type': 'actionType',
|
|
58
|
+
'command': 'command',
|
|
59
|
+
'created_at': 'createdAt',
|
|
60
|
+
'id': 'id',
|
|
61
|
+
'output': 'output',
|
|
62
|
+
'project_id': 'projectId',
|
|
63
|
+
'resource_id': 'resourceId',
|
|
64
|
+
'schedule_id': 'scheduleId',
|
|
65
|
+
'state': 'state',
|
|
66
|
+
'stopped_at': 'stoppedAt'
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
def __init__(self, action_type: 'V1ScheduleActionType' =None, command: 'str' =None, created_at: 'datetime' =None, id: 'str' =None, output: 'str' =None, project_id: 'str' =None, resource_id: 'str' =None, schedule_id: 'str' =None, state: 'str' =None, stopped_at: 'datetime' =None): # noqa: E501
|
|
70
|
+
"""V1ScheduleRun - a model defined in Swagger""" # noqa: E501
|
|
71
|
+
self._action_type = None
|
|
72
|
+
self._command = None
|
|
73
|
+
self._created_at = None
|
|
74
|
+
self._id = None
|
|
75
|
+
self._output = None
|
|
76
|
+
self._project_id = None
|
|
77
|
+
self._resource_id = None
|
|
78
|
+
self._schedule_id = None
|
|
79
|
+
self._state = None
|
|
80
|
+
self._stopped_at = None
|
|
81
|
+
self.discriminator = None
|
|
82
|
+
if action_type is not None:
|
|
83
|
+
self.action_type = action_type
|
|
84
|
+
if command is not None:
|
|
85
|
+
self.command = command
|
|
86
|
+
if created_at is not None:
|
|
87
|
+
self.created_at = created_at
|
|
88
|
+
if id is not None:
|
|
89
|
+
self.id = id
|
|
90
|
+
if output is not None:
|
|
91
|
+
self.output = output
|
|
92
|
+
if project_id is not None:
|
|
93
|
+
self.project_id = project_id
|
|
94
|
+
if resource_id is not None:
|
|
95
|
+
self.resource_id = resource_id
|
|
96
|
+
if schedule_id is not None:
|
|
97
|
+
self.schedule_id = schedule_id
|
|
98
|
+
if state is not None:
|
|
99
|
+
self.state = state
|
|
100
|
+
if stopped_at is not None:
|
|
101
|
+
self.stopped_at = stopped_at
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
def action_type(self) -> 'V1ScheduleActionType':
|
|
105
|
+
"""Gets the action_type of this V1ScheduleRun. # noqa: E501
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
:return: The action_type of this V1ScheduleRun. # noqa: E501
|
|
109
|
+
:rtype: V1ScheduleActionType
|
|
110
|
+
"""
|
|
111
|
+
return self._action_type
|
|
112
|
+
|
|
113
|
+
@action_type.setter
|
|
114
|
+
def action_type(self, action_type: 'V1ScheduleActionType'):
|
|
115
|
+
"""Sets the action_type of this V1ScheduleRun.
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
:param action_type: The action_type of this V1ScheduleRun. # noqa: E501
|
|
119
|
+
:type: V1ScheduleActionType
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
self._action_type = action_type
|
|
123
|
+
|
|
124
|
+
@property
|
|
125
|
+
def command(self) -> 'str':
|
|
126
|
+
"""Gets the command of this V1ScheduleRun. # noqa: E501
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
:return: The command of this V1ScheduleRun. # noqa: E501
|
|
130
|
+
:rtype: str
|
|
131
|
+
"""
|
|
132
|
+
return self._command
|
|
133
|
+
|
|
134
|
+
@command.setter
|
|
135
|
+
def command(self, command: 'str'):
|
|
136
|
+
"""Sets the command of this V1ScheduleRun.
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
:param command: The command of this V1ScheduleRun. # noqa: E501
|
|
140
|
+
:type: str
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
self._command = command
|
|
144
|
+
|
|
145
|
+
@property
|
|
146
|
+
def created_at(self) -> 'datetime':
|
|
147
|
+
"""Gets the created_at of this V1ScheduleRun. # noqa: E501
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
:return: The created_at of this V1ScheduleRun. # noqa: E501
|
|
151
|
+
:rtype: datetime
|
|
152
|
+
"""
|
|
153
|
+
return self._created_at
|
|
154
|
+
|
|
155
|
+
@created_at.setter
|
|
156
|
+
def created_at(self, created_at: 'datetime'):
|
|
157
|
+
"""Sets the created_at of this V1ScheduleRun.
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
:param created_at: The created_at of this V1ScheduleRun. # noqa: E501
|
|
161
|
+
:type: datetime
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
self._created_at = created_at
|
|
165
|
+
|
|
166
|
+
@property
|
|
167
|
+
def id(self) -> 'str':
|
|
168
|
+
"""Gets the id of this V1ScheduleRun. # noqa: E501
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
:return: The id of this V1ScheduleRun. # noqa: E501
|
|
172
|
+
:rtype: str
|
|
173
|
+
"""
|
|
174
|
+
return self._id
|
|
175
|
+
|
|
176
|
+
@id.setter
|
|
177
|
+
def id(self, id: 'str'):
|
|
178
|
+
"""Sets the id of this V1ScheduleRun.
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
:param id: The id of this V1ScheduleRun. # noqa: E501
|
|
182
|
+
:type: str
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
self._id = id
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def output(self) -> 'str':
|
|
189
|
+
"""Gets the output of this V1ScheduleRun. # noqa: E501
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
:return: The output of this V1ScheduleRun. # noqa: E501
|
|
193
|
+
:rtype: str
|
|
194
|
+
"""
|
|
195
|
+
return self._output
|
|
196
|
+
|
|
197
|
+
@output.setter
|
|
198
|
+
def output(self, output: 'str'):
|
|
199
|
+
"""Sets the output of this V1ScheduleRun.
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
:param output: The output of this V1ScheduleRun. # noqa: E501
|
|
203
|
+
:type: str
|
|
204
|
+
"""
|
|
205
|
+
|
|
206
|
+
self._output = output
|
|
207
|
+
|
|
208
|
+
@property
|
|
209
|
+
def project_id(self) -> 'str':
|
|
210
|
+
"""Gets the project_id of this V1ScheduleRun. # noqa: E501
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
:return: The project_id of this V1ScheduleRun. # noqa: E501
|
|
214
|
+
:rtype: str
|
|
215
|
+
"""
|
|
216
|
+
return self._project_id
|
|
217
|
+
|
|
218
|
+
@project_id.setter
|
|
219
|
+
def project_id(self, project_id: 'str'):
|
|
220
|
+
"""Sets the project_id of this V1ScheduleRun.
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
:param project_id: The project_id of this V1ScheduleRun. # noqa: E501
|
|
224
|
+
:type: str
|
|
225
|
+
"""
|
|
226
|
+
|
|
227
|
+
self._project_id = project_id
|
|
228
|
+
|
|
229
|
+
@property
|
|
230
|
+
def resource_id(self) -> 'str':
|
|
231
|
+
"""Gets the resource_id of this V1ScheduleRun. # noqa: E501
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
:return: The resource_id of this V1ScheduleRun. # noqa: E501
|
|
235
|
+
:rtype: str
|
|
236
|
+
"""
|
|
237
|
+
return self._resource_id
|
|
238
|
+
|
|
239
|
+
@resource_id.setter
|
|
240
|
+
def resource_id(self, resource_id: 'str'):
|
|
241
|
+
"""Sets the resource_id of this V1ScheduleRun.
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
:param resource_id: The resource_id of this V1ScheduleRun. # noqa: E501
|
|
245
|
+
:type: str
|
|
246
|
+
"""
|
|
247
|
+
|
|
248
|
+
self._resource_id = resource_id
|
|
249
|
+
|
|
250
|
+
@property
|
|
251
|
+
def schedule_id(self) -> 'str':
|
|
252
|
+
"""Gets the schedule_id of this V1ScheduleRun. # noqa: E501
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
:return: The schedule_id of this V1ScheduleRun. # noqa: E501
|
|
256
|
+
:rtype: str
|
|
257
|
+
"""
|
|
258
|
+
return self._schedule_id
|
|
259
|
+
|
|
260
|
+
@schedule_id.setter
|
|
261
|
+
def schedule_id(self, schedule_id: 'str'):
|
|
262
|
+
"""Sets the schedule_id of this V1ScheduleRun.
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
:param schedule_id: The schedule_id of this V1ScheduleRun. # noqa: E501
|
|
266
|
+
:type: str
|
|
267
|
+
"""
|
|
268
|
+
|
|
269
|
+
self._schedule_id = schedule_id
|
|
270
|
+
|
|
271
|
+
@property
|
|
272
|
+
def state(self) -> 'str':
|
|
273
|
+
"""Gets the state of this V1ScheduleRun. # noqa: E501
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
:return: The state of this V1ScheduleRun. # noqa: E501
|
|
277
|
+
:rtype: str
|
|
278
|
+
"""
|
|
279
|
+
return self._state
|
|
280
|
+
|
|
281
|
+
@state.setter
|
|
282
|
+
def state(self, state: 'str'):
|
|
283
|
+
"""Sets the state of this V1ScheduleRun.
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
:param state: The state of this V1ScheduleRun. # noqa: E501
|
|
287
|
+
:type: str
|
|
288
|
+
"""
|
|
289
|
+
|
|
290
|
+
self._state = state
|
|
291
|
+
|
|
292
|
+
@property
|
|
293
|
+
def stopped_at(self) -> 'datetime':
|
|
294
|
+
"""Gets the stopped_at of this V1ScheduleRun. # noqa: E501
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
:return: The stopped_at of this V1ScheduleRun. # noqa: E501
|
|
298
|
+
:rtype: datetime
|
|
299
|
+
"""
|
|
300
|
+
return self._stopped_at
|
|
301
|
+
|
|
302
|
+
@stopped_at.setter
|
|
303
|
+
def stopped_at(self, stopped_at: 'datetime'):
|
|
304
|
+
"""Sets the stopped_at of this V1ScheduleRun.
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
:param stopped_at: The stopped_at of this V1ScheduleRun. # noqa: E501
|
|
308
|
+
:type: datetime
|
|
309
|
+
"""
|
|
310
|
+
|
|
311
|
+
self._stopped_at = stopped_at
|
|
312
|
+
|
|
313
|
+
def to_dict(self) -> dict:
|
|
314
|
+
"""Returns the model properties as a dict"""
|
|
315
|
+
result = {}
|
|
316
|
+
|
|
317
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
318
|
+
value = getattr(self, attr)
|
|
319
|
+
if isinstance(value, list):
|
|
320
|
+
result[attr] = list(map(
|
|
321
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
322
|
+
value
|
|
323
|
+
))
|
|
324
|
+
elif hasattr(value, "to_dict"):
|
|
325
|
+
result[attr] = value.to_dict()
|
|
326
|
+
elif isinstance(value, dict):
|
|
327
|
+
result[attr] = dict(map(
|
|
328
|
+
lambda item: (item[0], item[1].to_dict())
|
|
329
|
+
if hasattr(item[1], "to_dict") else item,
|
|
330
|
+
value.items()
|
|
331
|
+
))
|
|
332
|
+
else:
|
|
333
|
+
result[attr] = value
|
|
334
|
+
if issubclass(V1ScheduleRun, dict):
|
|
335
|
+
for key, value in self.items():
|
|
336
|
+
result[key] = value
|
|
337
|
+
|
|
338
|
+
return result
|
|
339
|
+
|
|
340
|
+
def to_str(self) -> str:
|
|
341
|
+
"""Returns the string representation of the model"""
|
|
342
|
+
return pprint.pformat(self.to_dict())
|
|
343
|
+
|
|
344
|
+
def __repr__(self) -> str:
|
|
345
|
+
"""For `print` and `pprint`"""
|
|
346
|
+
return self.to_str()
|
|
347
|
+
|
|
348
|
+
def __eq__(self, other: 'V1ScheduleRun') -> bool:
|
|
349
|
+
"""Returns true if both objects are equal"""
|
|
350
|
+
if not isinstance(other, V1ScheduleRun):
|
|
351
|
+
return False
|
|
352
|
+
|
|
353
|
+
return self.__dict__ == other.__dict__
|
|
354
|
+
|
|
355
|
+
def __ne__(self, other: 'V1ScheduleRun') -> bool:
|
|
356
|
+
"""Returns true if both objects are not equal"""
|
|
357
|
+
return not self == other
|
|
@@ -76,6 +76,7 @@ class V1UserFeatures(object):
|
|
|
76
76
|
'f241': 'bool',
|
|
77
77
|
'f242': 'bool',
|
|
78
78
|
'f243': 'bool',
|
|
79
|
+
'f244': 'bool',
|
|
79
80
|
'fair_share': 'bool',
|
|
80
81
|
'featured_studios_admin': 'bool',
|
|
81
82
|
'gcp_overprovisioning': 'bool',
|
|
@@ -168,6 +169,7 @@ class V1UserFeatures(object):
|
|
|
168
169
|
'f241': 'f241',
|
|
169
170
|
'f242': 'f242',
|
|
170
171
|
'f243': 'f243',
|
|
172
|
+
'f244': 'f244',
|
|
171
173
|
'fair_share': 'fairShare',
|
|
172
174
|
'featured_studios_admin': 'featuredStudiosAdmin',
|
|
173
175
|
'gcp_overprovisioning': 'gcpOverprovisioning',
|
|
@@ -224,7 +226,7 @@ class V1UserFeatures(object):
|
|
|
224
226
|
'writable_s3_connections': 'writableS3Connections'
|
|
225
227
|
}
|
|
226
228
|
|
|
227
|
-
def __init__(self, academic_tier: 'bool' =None, add_data_v2: 'bool' =None, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, auto_join_orgs: 'bool' =None, b2c_experience: 'bool' =None, byo_machine_type: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, chat_models: 'bool' =None, cloudspace_schedules: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, control_center_monitoring: 'bool' =None, cost_attribution_settings: 'bool' =None, custom_app_domain: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, deployment_persistent_disk: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, f227: 'bool' =None, f234: 'bool' =None, f236: 'bool' =None, f237: 'bool' =None, f238: 'bool' =None, f239: 'bool' =None, f240: 'bool' =None, f241: 'bool' =None, f242: 'bool' =None, f243: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, gcp_overprovisioning: 'bool' =None, gcs_connections_optimized: 'bool' =None, gcs_folders: 'bool' =None, instant_capacity_reservation: 'bool' =None, job_artifacts_v2: 'bool' =None, kubernetes_cluster_ui: 'bool' =None, kubernetes_clusters: 'bool' =None, landing_studios: 'bool' =None, lit_logger: 'bool' =None, marketplace: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, model_api_dashboard: 'bool' =None, model_api_dashboard_clickhouse: 'bool' =None, multicloud_folders: 'bool' =None, multiple_studio_versions: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, onboarding_v2: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, persistent_disk: 'bool' =None, plugin_distributed: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_service: 'bool' =None, plugin_sweeps: 'bool' =None, pricing_updates: 'bool' =None, product_generator: 'bool' =None, product_license: 'bool' =None, project_selector: 'bool' =None, publish_pipelines: 'bool' =None, r2_data_connections: 'bool' =None, reserved_machines_tab: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, show_dev_admin: 'bool' =None, single_wallet: 'bool' =None, slurm: 'bool' =None, specialised_studios: 'bool' =None, storage_overuse_deletion: 'bool' =None, studio_config: 'bool' =None, studio_sharing_v2: 'bool' =None, studio_version_visibility: 'bool' =None, trainium2: 'bool' =None, use_internal_data_connection_mounts: 'bool' =None, use_rclone_mounts_only: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None, writable_s3_connections: 'bool' =None): # noqa: E501
|
|
229
|
+
def __init__(self, academic_tier: 'bool' =None, add_data_v2: 'bool' =None, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, auto_join_orgs: 'bool' =None, b2c_experience: 'bool' =None, byo_machine_type: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, chat_models: 'bool' =None, cloudspace_schedules: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, control_center_monitoring: 'bool' =None, cost_attribution_settings: 'bool' =None, custom_app_domain: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, deployment_persistent_disk: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, f227: 'bool' =None, f234: 'bool' =None, f236: 'bool' =None, f237: 'bool' =None, f238: 'bool' =None, f239: 'bool' =None, f240: 'bool' =None, f241: 'bool' =None, f242: 'bool' =None, f243: 'bool' =None, f244: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, gcp_overprovisioning: 'bool' =None, gcs_connections_optimized: 'bool' =None, gcs_folders: 'bool' =None, instant_capacity_reservation: 'bool' =None, job_artifacts_v2: 'bool' =None, kubernetes_cluster_ui: 'bool' =None, kubernetes_clusters: 'bool' =None, landing_studios: 'bool' =None, lit_logger: 'bool' =None, marketplace: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, model_api_dashboard: 'bool' =None, model_api_dashboard_clickhouse: 'bool' =None, multicloud_folders: 'bool' =None, multiple_studio_versions: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, onboarding_v2: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, persistent_disk: 'bool' =None, plugin_distributed: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_service: 'bool' =None, plugin_sweeps: 'bool' =None, pricing_updates: 'bool' =None, product_generator: 'bool' =None, product_license: 'bool' =None, project_selector: 'bool' =None, publish_pipelines: 'bool' =None, r2_data_connections: 'bool' =None, reserved_machines_tab: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, show_dev_admin: 'bool' =None, single_wallet: 'bool' =None, slurm: 'bool' =None, specialised_studios: 'bool' =None, storage_overuse_deletion: 'bool' =None, studio_config: 'bool' =None, studio_sharing_v2: 'bool' =None, studio_version_visibility: 'bool' =None, trainium2: 'bool' =None, use_internal_data_connection_mounts: 'bool' =None, use_rclone_mounts_only: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None, writable_s3_connections: 'bool' =None): # noqa: E501
|
|
228
230
|
"""V1UserFeatures - a model defined in Swagger""" # noqa: E501
|
|
229
231
|
self._academic_tier = None
|
|
230
232
|
self._add_data_v2 = None
|
|
@@ -261,6 +263,7 @@ class V1UserFeatures(object):
|
|
|
261
263
|
self._f241 = None
|
|
262
264
|
self._f242 = None
|
|
263
265
|
self._f243 = None
|
|
266
|
+
self._f244 = None
|
|
264
267
|
self._fair_share = None
|
|
265
268
|
self._featured_studios_admin = None
|
|
266
269
|
self._gcp_overprovisioning = None
|
|
@@ -386,6 +389,8 @@ class V1UserFeatures(object):
|
|
|
386
389
|
self.f242 = f242
|
|
387
390
|
if f243 is not None:
|
|
388
391
|
self.f243 = f243
|
|
392
|
+
if f244 is not None:
|
|
393
|
+
self.f244 = f244
|
|
389
394
|
if fair_share is not None:
|
|
390
395
|
self.fair_share = fair_share
|
|
391
396
|
if featured_studios_admin is not None:
|
|
@@ -1230,6 +1235,27 @@ class V1UserFeatures(object):
|
|
|
1230
1235
|
|
|
1231
1236
|
self._f243 = f243
|
|
1232
1237
|
|
|
1238
|
+
@property
|
|
1239
|
+
def f244(self) -> 'bool':
|
|
1240
|
+
"""Gets the f244 of this V1UserFeatures. # noqa: E501
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
:return: The f244 of this V1UserFeatures. # noqa: E501
|
|
1244
|
+
:rtype: bool
|
|
1245
|
+
"""
|
|
1246
|
+
return self._f244
|
|
1247
|
+
|
|
1248
|
+
@f244.setter
|
|
1249
|
+
def f244(self, f244: 'bool'):
|
|
1250
|
+
"""Sets the f244 of this V1UserFeatures.
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
:param f244: The f244 of this V1UserFeatures. # noqa: E501
|
|
1254
|
+
:type: bool
|
|
1255
|
+
"""
|
|
1256
|
+
|
|
1257
|
+
self._f244 = f244
|
|
1258
|
+
|
|
1233
1259
|
@property
|
|
1234
1260
|
def fair_share(self) -> 'bool':
|
|
1235
1261
|
"""Gets the fair_share of this V1UserFeatures. # noqa: E501
|
lightning_sdk/llm/llm.py
CHANGED
|
@@ -138,16 +138,21 @@ class LLM:
|
|
|
138
138
|
self._cloud_url = LLM._cached_auth_info["cloud_url"]
|
|
139
139
|
self._org = None
|
|
140
140
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
141
|
+
@staticmethod
|
|
142
|
+
def _parse_model_name(name: str) -> Tuple[str, str]:
|
|
143
|
+
"""Parses the model name into provider and model name.
|
|
144
|
+
|
|
145
|
+
>>> LLM._parse_model_name("openai/v1/gpt-3.5-turbo")
|
|
146
|
+
('openai', 'v1/gpt-3.5-turbo')
|
|
147
|
+
"""
|
|
148
|
+
if "/" not in name:
|
|
149
|
+
raise ValueError(
|
|
150
|
+
f"Invalid model name format: '{name}'. "
|
|
151
|
+
"Model name must be in the format `provider/model_name`."
|
|
152
|
+
"(e.g., 'lightning-ai/gpt-oss-20b')"
|
|
153
|
+
)
|
|
154
|
+
provider, model_name = name.split("/", maxsplit=1)
|
|
155
|
+
return provider.lower(), model_name
|
|
151
156
|
|
|
152
157
|
# returns the assistant ID
|
|
153
158
|
def _get_model_id(self) -> str:
|