craft-ai-sdk 0.67.1__tar.gz → 0.68.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 craft-ai-sdk might be problematic. Click here for more details.

Files changed (34) hide show
  1. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/PKG-INFO +1 -1
  2. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/__init__.py +1 -1
  3. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/data_store.py +1 -1
  4. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/endpoints.py +11 -8
  5. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/pipelines.py +6 -6
  6. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/sdk.py +1 -1
  7. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/documentation.pdf +0 -0
  8. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/pyproject.toml +1 -1
  9. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/LICENSE +0 -0
  10. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/README.md +0 -0
  11. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/constants.py +0 -0
  12. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/deployments.py +0 -0
  13. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/environment_variables.py +0 -0
  14. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/pipeline_executions.py +0 -0
  15. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/pipeline_metrics.py +0 -0
  16. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/pipeline_templates.py +0 -0
  17. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/resource_metrics.py +0 -0
  18. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/steps.py +0 -0
  19. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/users.py +0 -0
  20. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/core/vector_database.py +0 -0
  21. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/exceptions.py +0 -0
  22. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/io.py +0 -0
  23. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/shared/authentication.py +0 -0
  24. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/shared/environments.py +0 -0
  25. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/shared/execution_context.py +0 -0
  26. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/shared/helpers.py +0 -0
  27. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/shared/logger.py +0 -0
  28. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/shared/request_response_handler.py +0 -0
  29. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/shared/types.py +0 -0
  30. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/shared/warnings.py +0 -0
  31. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/utils/__init__.py +0 -0
  32. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/utils/datetime_utils.py +0 -0
  33. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/utils/dict_utils.py +0 -0
  34. {craft_ai_sdk-0.67.1 → craft_ai_sdk-0.68.0rc1}/craft_ai_sdk/utils/file_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: craft-ai-sdk
3
- Version: 0.67.1
3
+ Version: 0.68.0rc1
4
4
  Summary: Craft AI MLOps platform SDK
5
5
  License: Apache-2.0
6
6
  Author: Craft AI
@@ -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.1"
16
+ __version__ = "0.68.0rc1"
@@ -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(
@@ -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.1" # Would be better to share it somewhere
144
+ _version = "0.68.0rc1" # Would be better to share it somewhere
145
145
 
146
146
  def __init__(
147
147
  self,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "craft-ai-sdk"
3
- version = "0.67.1"
3
+ version = "0.68.0rc1"
4
4
  description = "Craft AI MLOps platform SDK"
5
5
  license = "Apache-2.0"
6
6
  authors = ["Craft AI <contact@craft.ai>"]
File without changes