craft-ai-sdk 0.67.1rc1__py3-none-any.whl → 0.68.0rc2__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.
craft_ai_sdk/__init__.py CHANGED
@@ -13,4 +13,4 @@ from .io import ( # noqa: F401
13
13
  )
14
14
  from .sdk import CraftAiSdk # noqa: F401
15
15
 
16
- __version__ = "0.67.1rc1"
16
+ __version__ = "0.68.0rc2"
@@ -75,7 +75,7 @@ def iter_data_store_objects(
75
75
  if continuation_token is None:
76
76
  return
77
77
  else:
78
- params = {"continuation_token": continuation_token, **params}
78
+ params["continuation_token"] = continuation_token
79
79
 
80
80
 
81
81
  def list_data_store_objects(
@@ -199,15 +199,18 @@ def retrieve_endpoint_results(
199
199
  if isinstance(value, dict) and "value" in value:
200
200
  outputs[key] = value["value"]
201
201
  if isinstance(value, dict) and "url" in value:
202
- # If the output is a file, we need to download it
203
- url = f"{value['url']}?token={endpoint_token}"
204
- file_response = requests.get(url)
205
- if file_response.status_code == 200:
206
- outputs[key] = file_response.content
202
+ if not isinstance(value["url"], str):
203
+ outputs[key] = None
207
204
  else:
208
- raise ValueError(
209
- f"Failed to download file output {key}: {file_response.text}"
210
- )
205
+ # If the output is a file, we need to download it
206
+ url = f"{value['url']}?token={endpoint_token}"
207
+ file_response = requests.get(url)
208
+ if file_response.status_code == 200:
209
+ outputs[key] = file_response.content
210
+ else:
211
+ raise ValueError(
212
+ f"Failed to download file output {key}: {file_response.text}"
213
+ )
211
214
 
212
215
  return {
213
216
  "outputs": response_data.get("outputs", []),
@@ -84,16 +84,14 @@ def _create_pipeline_from_template(
84
84
 
85
85
  def _create_pipeline_with_step(
86
86
  sdk: BaseCraftAiSdk, pipeline_name: str, step_name: str
87
- ) -> Pipeline:
87
+ ) -> None:
88
88
  url = f"{sdk.base_environment_api_url}/pipelines"
89
89
  body = {
90
90
  "pipeline_name": pipeline_name,
91
91
  "step_names": [step_name],
92
92
  }
93
93
 
94
- return remove_keys_from_dict(
95
- sdk._post(url, json=body), {"is_archived", "pipeline_id"}
96
- )
94
+ sdk._post(url, json=body)
97
95
 
98
96
 
99
97
  @overload
@@ -337,7 +335,8 @@ def create_pipeline(
337
335
  FutureWarning,
338
336
  stacklevel=2,
339
337
  )
340
- return _create_pipeline_with_step(sdk, pipeline_name, function_path)
338
+ _create_pipeline_with_step(sdk, pipeline_name, function_path)
339
+ return get_pipeline(sdk, pipeline_name, wait_for_completion, timeout_s)
341
340
 
342
341
  # or with create_pipeline(:pipeline_name:, step_name=:step_name:).
343
342
  if "step_name" in kwargs:
@@ -348,7 +347,8 @@ def create_pipeline(
348
347
  "should be provided."
349
348
  )
350
349
 
351
- return _create_pipeline_with_step(sdk, pipeline_name, kwargs["step_name"])
350
+ _create_pipeline_with_step(sdk, pipeline_name, kwargs["step_name"])
351
+ return get_pipeline(sdk, pipeline_name, wait_for_completion, timeout_s)
352
352
 
353
353
  if len(kwargs) != 0:
354
354
  raise ValueError(
craft_ai_sdk/sdk.py CHANGED
@@ -141,7 +141,7 @@ class CraftAiSdk(BaseCraftAiSdk):
141
141
  os.environ.get("CRAFT_AI__MULTIPART_PART_SIZE__B", str(38 * 256 * 1024))
142
142
  )
143
143
  _access_token_margin = timedelta(seconds=30)
144
- _version = "0.67.1rc1" # Would be better to share it somewhere
144
+ _version = "0.68.0rc2" # Would be better to share it somewhere
145
145
 
146
146
  def __init__(
147
147
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: craft-ai-sdk
3
- Version: 0.67.1rc1
3
+ Version: 0.68.0rc2
4
4
  Summary: Craft AI MLOps platform SDK
5
5
  License: Apache-2.0
6
6
  Author: Craft AI
@@ -1,20 +1,20 @@
1
- craft_ai_sdk/__init__.py,sha256=vSigS0OentQ4zqfZyqi1m5cKGQz1nVdRznuZl09gzwM,366
1
+ craft_ai_sdk/__init__.py,sha256=tQ-JG-V2iIWjxexEj0I_3oCwgBx3uzOfVMQgxpFtC4E,366
2
2
  craft_ai_sdk/constants.py,sha256=rH4JrGlTpbjjjNRrKhk5oScbj5G5INrcVza6Bb6kIzY,980
3
- craft_ai_sdk/core/data_store.py,sha256=5SYJoU9xXqLBc5540Xb6UnLYOY0V5SQGor31nF3jN8A,9968
3
+ craft_ai_sdk/core/data_store.py,sha256=BPQalGcm6bujgkgu-MtNWWhKiJEg4MiVuCtByNbTbK8,9956
4
4
  craft_ai_sdk/core/deployments.py,sha256=Hig0Z6tZXbaLxms9ENtKI4OG3ki7G4Iz3wGk2V2Gmfg,37731
5
- craft_ai_sdk/core/endpoints.py,sha256=ad8_oHVCwrTpnlrlqvEcO48nXbzmuWTaUbh82JdRX6g,8018
5
+ craft_ai_sdk/core/endpoints.py,sha256=cFf8scftD7XlMvpglLNRew-fesLUC_TcZ2UPyCbmUaA,8158
6
6
  craft_ai_sdk/core/environment_variables.py,sha256=CpkyneLf8UF-1QXe36Ay_RZJ8grSfbZZWBvGSQzKlLs,2221
7
7
  craft_ai_sdk/core/pipeline_executions.py,sha256=EfhNDzWiKro9-gDUPHJFMFcdPXtznlJo2leFKLloDmA,18709
8
8
  craft_ai_sdk/core/pipeline_metrics.py,sha256=AYxF5HpLCfTYK-TydEHswaAHat3N9NiOTHpPd_R9-rY,7190
9
9
  craft_ai_sdk/core/pipeline_templates.py,sha256=3WjM4vsURpTNF3dt42h_xk68ysxFkz4kiOxqAb4VyRE,5623
10
- craft_ai_sdk/core/pipelines.py,sha256=lzDzmnRrwwsoXABb46sGO5tu27QEtBzCisSiuiIFsiU,26521
10
+ craft_ai_sdk/core/pipelines.py,sha256=FD6ai2_YhE1tz6QO57bj_lA-i93TXZzm0Y9PA0mpocg,26587
11
11
  craft_ai_sdk/core/resource_metrics.py,sha256=ubCe6QOhud3f-EQr_TXKBsrFFaxZubqTS3fZqfV7kgg,3457
12
12
  craft_ai_sdk/core/steps.py,sha256=TwOWXAAVpLPuSZ_gvf-3E5uKEvfGIzR52Y58bqKn_Ds,23487
13
13
  craft_ai_sdk/core/users.py,sha256=q5et87q0SOMpRTBOiLX026oaEOTaY1aGqKdbUC51zbA,618
14
14
  craft_ai_sdk/core/vector_database.py,sha256=S3h68Ej1FnHYJdc5LdLlNjobYYdmaCloSq2UaylPWko,2334
15
15
  craft_ai_sdk/exceptions.py,sha256=IC-JfZmmmaTsbMCgirOEByRmWnatQLjKe8BErRkuwM0,1075
16
16
  craft_ai_sdk/io.py,sha256=x1G7ga10W_SeTDLHe-FrhU26_WNwWW32-yprMmCZ5Ck,11836
17
- craft_ai_sdk/sdk.py,sha256=ulffaxyFBvPJIiZrJaiOtUQ8oDuZ42Yh1NSG7Mo4WaE,11031
17
+ craft_ai_sdk/sdk.py,sha256=55KwLEN2oa57_LpLb2QTM3CXfFHY4FPwMetBAvwG9K4,11031
18
18
  craft_ai_sdk/shared/authentication.py,sha256=5lJS_aNphkgI0-wvHFK4aW316ZRfOq9oywNpv-Oyn2M,1062
19
19
  craft_ai_sdk/shared/environments.py,sha256=JOV3s0KIFVl_zskJb--bybzIXEGQJjrf_T4dL-szSlQ,500
20
20
  craft_ai_sdk/shared/execution_context.py,sha256=B2Ghq-wiUvq81q5mhsm79Oc59c8c00uQxMIpApFD03o,585
@@ -27,8 +27,8 @@ craft_ai_sdk/utils/__init__.py,sha256=A0sLCXSPD1Z3q2GP1uLDjvif4ivOr__Hzg9RQysEuq
27
27
  craft_ai_sdk/utils/datetime_utils.py,sha256=yYP5HVdI879WXxQCajPTnas1pWrwInOxMux-mxqQNQM,734
28
28
  craft_ai_sdk/utils/dict_utils.py,sha256=1HQ3A14SN48XPFDmQleujGAgksmkjIs3hyPLpwhwh24,748
29
29
  craft_ai_sdk/utils/file_utils.py,sha256=o10-CDt4qzgCJNPykvlNrL6WTouhVLY8C8BVpHJYt18,2795
30
- craft_ai_sdk-0.67.1rc1.dist-info/LICENSE,sha256=_2oYRJic9lZK05LceuJ9aZZw5mPHYc1WQhJiVS-oGFU,10754
31
- craft_ai_sdk-0.67.1rc1.dist-info/METADATA,sha256=7mn1ROp_sqa2QIsKabqTeGYNvxSr-IXP-AdVs0bwDyk,1679
32
- craft_ai_sdk-0.67.1rc1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
33
- craft_ai_sdk-0.67.1rc1.dist-info/entry_points.txt,sha256=QC96WcXvvUfLMRgFD-l_y7_TgC9SqZybLs9EQ8dsGiQ,417
34
- craft_ai_sdk-0.67.1rc1.dist-info/RECORD,,
30
+ craft_ai_sdk-0.68.0rc2.dist-info/LICENSE,sha256=_2oYRJic9lZK05LceuJ9aZZw5mPHYc1WQhJiVS-oGFU,10754
31
+ craft_ai_sdk-0.68.0rc2.dist-info/METADATA,sha256=Ss_ejMAL2d4PYxqq65vkwDBGWO9Vs-yPLhMSVY4BpY8,1679
32
+ craft_ai_sdk-0.68.0rc2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
33
+ craft_ai_sdk-0.68.0rc2.dist-info/entry_points.txt,sha256=QC96WcXvvUfLMRgFD-l_y7_TgC9SqZybLs9EQ8dsGiQ,417
34
+ craft_ai_sdk-0.68.0rc2.dist-info/RECORD,,