luml-sdk 0.1.0rc1__tar.gz
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.
Potentially problematic release.
This version of luml-sdk might be problematic. Click here for more details.
- luml_sdk-0.1.0rc1/.claude/settings.local.json +8 -0
- luml_sdk-0.1.0rc1/.coverage +0 -0
- luml_sdk-0.1.0rc1/.gitignore +1 -0
- luml_sdk-0.1.0rc1/.python-version +1 -0
- luml_sdk-0.1.0rc1/PKG-INFO +17 -0
- luml_sdk-0.1.0rc1/README.md +0 -0
- luml_sdk-0.1.0rc1/documentation/API/dataforce/api/_client.md +297 -0
- luml_sdk-0.1.0rc1/documentation/API/dataforce/api/resources/bucket_secrets.md +570 -0
- luml_sdk-0.1.0rc1/documentation/API/dataforce/api/resources/collections.md +514 -0
- luml_sdk-0.1.0rc1/documentation/API/dataforce/api/resources/model_artifacts.md +1082 -0
- luml_sdk-0.1.0rc1/documentation/API/dataforce/api/resources/orbits.md +502 -0
- luml_sdk-0.1.0rc1/documentation/API/dataforce/api/resources/organizations.md +183 -0
- luml_sdk-0.1.0rc1/documentation/API/sidebar.json +5 -0
- luml_sdk-0.1.0rc1/examples/async_demo.py +248 -0
- luml_sdk-0.1.0rc1/examples/demo.py +245 -0
- luml_sdk-0.1.0rc1/examples/model_card_example.py +258 -0
- luml_sdk-0.1.0rc1/luml/__init__.py +1 -0
- luml_sdk-0.1.0rc1/luml/api/__init__.py +35 -0
- luml_sdk-0.1.0rc1/luml/api/_base_client.py +266 -0
- luml_sdk-0.1.0rc1/luml/api/_client.py +479 -0
- luml_sdk-0.1.0rc1/luml/api/_exceptions.py +196 -0
- luml_sdk-0.1.0rc1/luml/api/_types.py +164 -0
- luml_sdk-0.1.0rc1/luml/api/_utils.py +21 -0
- luml_sdk-0.1.0rc1/luml/api/py.typed +0 -0
- luml_sdk-0.1.0rc1/luml/api/resources/__init__.py +0 -0
- luml_sdk-0.1.0rc1/luml/api/resources/_validators.py +42 -0
- luml_sdk-0.1.0rc1/luml/api/resources/bucket_secrets.py +820 -0
- luml_sdk-0.1.0rc1/luml/api/resources/collections.py +631 -0
- luml_sdk-0.1.0rc1/luml/api/resources/model_artifacts.py +1354 -0
- luml_sdk-0.1.0rc1/luml/api/resources/orbits.py +576 -0
- luml_sdk-0.1.0rc1/luml/api/resources/organizations.py +219 -0
- luml_sdk-0.1.0rc1/luml/api/services/upload_service.py +95 -0
- luml_sdk-0.1.0rc1/luml/api/utils/__init__.py +0 -0
- luml_sdk-0.1.0rc1/luml/api/utils/azure_file_handler.py +139 -0
- luml_sdk-0.1.0rc1/luml/api/utils/base_file_handler.py +126 -0
- luml_sdk-0.1.0rc1/luml/api/utils/file_handler_factory.py +15 -0
- luml_sdk-0.1.0rc1/luml/api/utils/model_artifacts.py +121 -0
- luml_sdk-0.1.0rc1/luml/api/utils/s3_file_handler.py +166 -0
- luml_sdk-0.1.0rc1/luml/experiments/backends/__init__.py +21 -0
- luml_sdk-0.1.0rc1/luml/experiments/backends/_base.py +122 -0
- luml_sdk-0.1.0rc1/luml/experiments/backends/sqlite.py +661 -0
- luml_sdk-0.1.0rc1/luml/experiments/tracing/__init__.py +59 -0
- luml_sdk-0.1.0rc1/luml/experiments/tracing/span_exporter.py +161 -0
- luml_sdk-0.1.0rc1/luml/experiments/tracker.py +383 -0
- luml_sdk-0.1.0rc1/luml/experiments/utils.py +25 -0
- luml_sdk-0.1.0rc1/luml/integrations/__init__.py +0 -0
- luml_sdk-0.1.0rc1/luml/integrations/langgraph/__init__.py +3 -0
- luml_sdk-0.1.0rc1/luml/integrations/langgraph/packaging/__init__.py +246 -0
- luml_sdk-0.1.0rc1/luml/integrations/langgraph/packaging/_templates/mermaid.py +48 -0
- luml_sdk-0.1.0rc1/luml/integrations/langgraph/packaging/_templates/pyfunc.py +100 -0
- luml_sdk-0.1.0rc1/luml/integrations/sklearn/__init__.py +3 -0
- luml_sdk-0.1.0rc1/luml/integrations/sklearn/packaging/__init__.py +254 -0
- luml_sdk-0.1.0rc1/luml/integrations/sklearn/packaging/_template.py +40 -0
- luml_sdk-0.1.0rc1/luml/model_card/__init__.py +3 -0
- luml_sdk-0.1.0rc1/luml/model_card/builder.py +279 -0
- luml_sdk-0.1.0rc1/luml/model_card/templates.py +237 -0
- luml_sdk-0.1.0rc1/luml/modelref.py +141 -0
- luml_sdk-0.1.0rc1/luml/utils/deps.py +336 -0
- luml_sdk-0.1.0rc1/luml/utils/imports.py +92 -0
- luml_sdk-0.1.0rc1/luml/utils/tar.py +41 -0
- luml_sdk-0.1.0rc1/luml/utils/time.py +5 -0
- luml_sdk-0.1.0rc1/pyproject.toml +98 -0
- luml_sdk-0.1.0rc1/pytest.ini +21 -0
- luml_sdk-0.1.0rc1/tests/__init__.py +0 -0
- luml_sdk-0.1.0rc1/tests/api/__init__.py +0 -0
- luml_sdk-0.1.0rc1/tests/api/unit/__init__.py +0 -0
- luml_sdk-0.1.0rc1/tests/api/unit/test_bucket_resource.py +243 -0
- luml_sdk-0.1.0rc1/tests/api/unit/test_client.py +107 -0
- luml_sdk-0.1.0rc1/tests/api/unit/test_collection_resource.py +364 -0
- luml_sdk-0.1.0rc1/tests/api/unit/test_model_artifact_resource.py +359 -0
- luml_sdk-0.1.0rc1/tests/api/unit/test_orbit_resource.py +233 -0
- luml_sdk-0.1.0rc1/tests/api/unit/test_organization_resources.py +118 -0
- luml_sdk-0.1.0rc1/tests/conftest.py +167 -0
- luml_sdk-0.1.0rc1/tests/test_model_card.py +364 -0
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
uv.lock
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: luml_sdk
|
|
3
|
+
Version: 0.1.0rc1
|
|
4
|
+
Summary: LUML Python SDK
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
|
+
Requires-Dist: pyfnx-utils<1.0.0,>=0.0.1
|
|
7
|
+
Provides-Extra: api
|
|
8
|
+
Requires-Dist: httpx<1.0.0,>=0.28.1; extra == 'api'
|
|
9
|
+
Requires-Dist: pydantic<3.0.0,>=2.11.7; extra == 'api'
|
|
10
|
+
Provides-Extra: core
|
|
11
|
+
Requires-Dist: cloudpickle<4.0.0,>=3.1.2; extra == 'core'
|
|
12
|
+
Requires-Dist: fnnx<0.1.0,>=0.0.8; extra == 'core'
|
|
13
|
+
Requires-Dist: pydantic<3.0.0,>=2.11.7; extra == 'core'
|
|
14
|
+
Provides-Extra: tracing
|
|
15
|
+
Requires-Dist: opentelemetry-api>=1.36.0; extra == 'tracing'
|
|
16
|
+
Requires-Dist: opentelemetry-instrumentation-openai>=0.44.1; extra == 'tracing'
|
|
17
|
+
Requires-Dist: opentelemetry-sdk>=1.36.0; extra == 'tracing'
|
|
File without changes
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_label: _client
|
|
3
|
+
title: dataforce.api._client
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## DataForceClientBase
|
|
7
|
+
|
|
8
|
+
```python
|
|
9
|
+
class DataForceClientBase(ABC)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Base class for DataForce API clients.
|
|
13
|
+
|
|
14
|
+
## AsyncDataForceClient
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
class AsyncDataForceClient(DataForceClientBase, AsyncBaseClient)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
#### \_\_init\_\_
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
def __init__(base_url: str | None = None, api_key: str | None = None) -> None
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Async client for interacting with the DataForce platform API.
|
|
27
|
+
|
|
28
|
+
**Arguments**:
|
|
29
|
+
|
|
30
|
+
- `base_url` - Base URL of the DataForce API.
|
|
31
|
+
Defaults to production DataForce Api URL: https://api.dataforce.studio.
|
|
32
|
+
Can also be set in env with name DFS_BASE_URL
|
|
33
|
+
- `api_key` - Your DataForce API key for authentication.
|
|
34
|
+
Can also be set in env with name DFS_API_KEY
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
**Attributes**:
|
|
38
|
+
|
|
39
|
+
- `organizations` - Interface for managing experiments.
|
|
40
|
+
- `orbits` - Interface for managing orbits.
|
|
41
|
+
- `collections` - Interface for managing collections.
|
|
42
|
+
- `bucket_secrets` - Interface for managing bucket secrets.
|
|
43
|
+
- `model_artifacts` - Interface for managing model artifacts.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
**Raises**:
|
|
47
|
+
|
|
48
|
+
- `AuthenticationError` - If API key is invalid or missing.
|
|
49
|
+
- `ConfigurationError` - If required configuration is missing.
|
|
50
|
+
- `OrganizationResourceNotFoundError` - If organization not found
|
|
51
|
+
by ID or name passed for client configuration.
|
|
52
|
+
- `api_key`0 - If orbit not found by ID or name
|
|
53
|
+
passed for client configuration
|
|
54
|
+
- `api_key`1 - If collection not found by ID or
|
|
55
|
+
name passed for client configuration
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
**Example**:
|
|
59
|
+
|
|
60
|
+
>>> dfs = DataForceClient(
|
|
61
|
+
... api_key="dfs_your_api_key",
|
|
62
|
+
... organization="0199c455-21ec-7c74-8efe-41470e29bae5",
|
|
63
|
+
... orbit="0199c455-21ed-7aba-9fe5-5231611220de"
|
|
64
|
+
... )
|
|
65
|
+
|
|
66
|
+
>>> dfs = DataForceClient(
|
|
67
|
+
... api_key="dfs_your_api_key",
|
|
68
|
+
... organization="My Personal Organization",
|
|
69
|
+
... orbit="Default Orbit"
|
|
70
|
+
... )
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
**Notes**:
|
|
74
|
+
|
|
75
|
+
Default resource configuration is optional. If no values are provided during
|
|
76
|
+
client initialization and you have only one organization, orbit,
|
|
77
|
+
or collection, the appropriate resource will be automatically set as default
|
|
78
|
+
|
|
79
|
+
Hierarchy constraints:
|
|
80
|
+
|
|
81
|
+
- Cannot set default orbit without setting default organization first
|
|
82
|
+
- Cannot set default collection without setting default orbit first
|
|
83
|
+
- Default orbit must belong to the default organization
|
|
84
|
+
- Default collection must belong to the default orbit
|
|
85
|
+
|
|
86
|
+
You can change default resource after client inizialization
|
|
87
|
+
`api_key`2dfs.organization=4`api_key`2.
|
|
88
|
+
|
|
89
|
+
#### setup\_config
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
async def setup_config(*,
|
|
93
|
+
organization: str | None = None,
|
|
94
|
+
orbit: str | None = None,
|
|
95
|
+
collection: str | None = None) -> None
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Method for setting default values for AsyncDataForceClient
|
|
99
|
+
|
|
100
|
+
**Arguments**:
|
|
101
|
+
|
|
102
|
+
- `organization` - Default organization to use for operations.
|
|
103
|
+
Can be set by organization ID or name.
|
|
104
|
+
- `orbit` - Default orbit to use for operations.
|
|
105
|
+
Can be set by organization ID or name.
|
|
106
|
+
- `collection` - Default collection to use for operations.
|
|
107
|
+
Can be set by organization ID or name.
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
**Example**:
|
|
111
|
+
|
|
112
|
+
>>> dfs = AsyncDataForceClient(api_key="dfs_api_key")
|
|
113
|
+
>>> async def main():
|
|
114
|
+
... await dfs.setup_config(
|
|
115
|
+
... "0199c455-21ec-7c74-8efe-41470e29bae5",
|
|
116
|
+
... "0199c455-21ed-7aba-9fe5-5231611220de",
|
|
117
|
+
... "0199c455-21ee-74c6-b747-19a82f1a1e75"
|
|
118
|
+
... )
|
|
119
|
+
|
|
120
|
+
#### organizations
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
@cached_property
|
|
124
|
+
def organizations() -> "AsyncOrganizationResource"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Organizations interface.
|
|
128
|
+
|
|
129
|
+
#### bucket\_secrets
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
@cached_property
|
|
133
|
+
def bucket_secrets() -> "AsyncBucketSecretResource"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Bucket Secrets interface.
|
|
137
|
+
|
|
138
|
+
#### orbits
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
@cached_property
|
|
142
|
+
def orbits() -> "AsyncOrbitResource"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Orbits interface.
|
|
146
|
+
|
|
147
|
+
#### collections
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
@cached_property
|
|
151
|
+
def collections() -> "AsyncCollectionResource"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Collections interface.
|
|
155
|
+
|
|
156
|
+
#### model\_artifacts
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
@cached_property
|
|
160
|
+
def model_artifacts() -> "AsyncModelArtifactResource"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Model Artifacts interface.
|
|
164
|
+
|
|
165
|
+
## DataForceClient
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
class DataForceClient(DataForceClientBase, SyncBaseClient)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
#### \_\_init\_\_
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
def __init__(base_url: str | None = None,
|
|
175
|
+
api_key: str | None = None,
|
|
176
|
+
organization: str | None = None,
|
|
177
|
+
orbit: str | None = None,
|
|
178
|
+
collection: str | None = None) -> None
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Client for interacting with the DataForce platform API.
|
|
182
|
+
|
|
183
|
+
**Arguments**:
|
|
184
|
+
|
|
185
|
+
- `base_url` - Base URL of the DataForce API.
|
|
186
|
+
Defaults to production DataForce Api URL: https://api.dataforce.studio.
|
|
187
|
+
Can also be set in env with name DFS_BASE_URL
|
|
188
|
+
- `api_key` - Your DataForce API key for authentication.
|
|
189
|
+
Can also be set in env with name DFS_API_KEY
|
|
190
|
+
- `organization` - Default organization to use for operations.
|
|
191
|
+
Can be set by organization ID or name.
|
|
192
|
+
- `orbit` - Default orbit to use for operations.
|
|
193
|
+
Can be set by organization ID or name.
|
|
194
|
+
- `collection` - Default collection to use for operations.
|
|
195
|
+
Can be set by organization ID or name.
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
**Attributes**:
|
|
199
|
+
|
|
200
|
+
- `organizations` - Interface for managing experiments.
|
|
201
|
+
- `orbits` - Interface for managing orbits.
|
|
202
|
+
- `collections` - Interface for managing collections.
|
|
203
|
+
- `bucket_secrets` - Interface for managing bucket secrets.
|
|
204
|
+
- `model_artifacts` - Interface for managing model artifacts.
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
**Raises**:
|
|
208
|
+
|
|
209
|
+
- `api_key`0 - If API key is invalid or missing.
|
|
210
|
+
- `api_key`1 - If required configuration is missing.
|
|
211
|
+
- `api_key`2 - If organization not found by ID
|
|
212
|
+
or name passed for client configuration
|
|
213
|
+
- `api_key`3 - If orbit not found by ID
|
|
214
|
+
or name passed for client configuration
|
|
215
|
+
- `api_key`4 - If collection not found
|
|
216
|
+
by ID or name passed for client configuration
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
**Example**:
|
|
220
|
+
|
|
221
|
+
>>> dfs = DataForceClient(
|
|
222
|
+
... api_key="dfs_your_api_key",
|
|
223
|
+
... organization="0199c455-21ec-7c74-8efe-41470e29bae5",
|
|
224
|
+
... orbit="0199c455-21ed-7aba-9fe5-5231611220de"
|
|
225
|
+
... )
|
|
226
|
+
|
|
227
|
+
>>> dfs = DataForceClient(
|
|
228
|
+
... api_key="dfs_your_api_key",
|
|
229
|
+
... organization="My Personal Organization",
|
|
230
|
+
... orbit="Default Orbit"
|
|
231
|
+
... )
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
**Notes**:
|
|
235
|
+
|
|
236
|
+
For long-running operations, consider using the async version:
|
|
237
|
+
AsyncDataForceClient.
|
|
238
|
+
|
|
239
|
+
Default resource configuration is optional. If no values are provided during
|
|
240
|
+
client initialization and you have only one organization, orbit,
|
|
241
|
+
or collection, the appropriate resource will be automatically set as default
|
|
242
|
+
|
|
243
|
+
Hierarchy constraints:
|
|
244
|
+
|
|
245
|
+
- Cannot set default orbit without setting default organization first
|
|
246
|
+
- Cannot set default collection without setting default orbit first
|
|
247
|
+
- Default orbit must belong to the default organization
|
|
248
|
+
- Default collection must belong to the default orbit
|
|
249
|
+
|
|
250
|
+
You can change default resource after client inizialization
|
|
251
|
+
`api_key`5dfs.organization="0199c455-21ec-7c74-8efe-41470e29bae5"`api_key`5.
|
|
252
|
+
|
|
253
|
+
#### organizations
|
|
254
|
+
|
|
255
|
+
```python
|
|
256
|
+
@cached_property
|
|
257
|
+
def organizations() -> "OrganizationResource"
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Organizations interface.
|
|
261
|
+
|
|
262
|
+
#### bucket\_secrets
|
|
263
|
+
|
|
264
|
+
```python
|
|
265
|
+
@cached_property
|
|
266
|
+
def bucket_secrets() -> "BucketSecretResource"
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Bucket Secrets interface.
|
|
270
|
+
|
|
271
|
+
#### orbits
|
|
272
|
+
|
|
273
|
+
```python
|
|
274
|
+
@cached_property
|
|
275
|
+
def orbits() -> "OrbitResource"
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Orbits interface.
|
|
279
|
+
|
|
280
|
+
#### collections
|
|
281
|
+
|
|
282
|
+
```python
|
|
283
|
+
@cached_property
|
|
284
|
+
def collections() -> "CollectionResource"
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Collections interface.
|
|
288
|
+
|
|
289
|
+
#### model\_artifacts
|
|
290
|
+
|
|
291
|
+
```python
|
|
292
|
+
@cached_property
|
|
293
|
+
def model_artifacts() -> "ModelArtifactResource"
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Model Artifacts interface.
|
|
297
|
+
|