craft-ai-sdk 0.66.1rc1__tar.gz → 0.67.0__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 (33) hide show
  1. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/PKG-INFO +1 -1
  2. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/__init__.py +1 -1
  3. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/deployments.py +55 -58
  4. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/pipeline_executions.py +12 -12
  5. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/pipeline_metrics.py +6 -6
  6. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/steps.py +7 -0
  7. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/sdk.py +16 -16
  8. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/documentation.pdf +0 -0
  9. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/pyproject.toml +1 -1
  10. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/LICENSE +0 -0
  11. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/README.md +0 -0
  12. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/constants.py +0 -0
  13. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/data_store.py +0 -0
  14. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/endpoints.py +0 -0
  15. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/environment_variables.py +0 -0
  16. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/pipelines.py +0 -0
  17. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/resource_metrics.py +0 -0
  18. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/users.py +0 -0
  19. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/core/vector_database.py +0 -0
  20. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/exceptions.py +0 -0
  21. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/io.py +0 -0
  22. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/shared/authentication.py +0 -0
  23. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/shared/environments.py +0 -0
  24. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/shared/execution_context.py +0 -0
  25. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/shared/helpers.py +0 -0
  26. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/shared/logger.py +0 -0
  27. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/shared/request_response_handler.py +0 -0
  28. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/shared/types.py +0 -0
  29. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/shared/warnings.py +0 -0
  30. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/utils/__init__.py +0 -0
  31. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/utils/datetime_utils.py +0 -0
  32. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/craft_ai_sdk/utils/dict_utils.py +0 -0
  33. {craft_ai_sdk-0.66.1rc1 → craft_ai_sdk-0.67.0}/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.66.1rc1
3
+ Version: 0.67.0
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.66.1rc1"
16
+ __version__ = "0.67.0"
@@ -156,8 +156,9 @@ def create_deployment(
156
156
  automatically adapt to the number of executions. During the lifetime
157
157
  of a deployment, a pod may be re-created by the platform for
158
158
  technical reasons (including if it tries to use more memory than
159
- available). This mode is not compatible with steps created with a
160
- ``container_config.dockerfile_path`` property in :func:`create_step`.
159
+ available). This mode is not compatible with pipelines created with a
160
+ ``container_config.dockerfile_path`` property in
161
+ :func:`create_pipeline`.
161
162
 
162
163
  schedule (:obj:`str`, optional): Schedule of the deployment. Required and
163
164
  applicable only if ``execution_rule`` is ``"periodic"``. Must be a valid
@@ -184,19 +185,15 @@ def create_deployment(
184
185
  List of input mappings, to map pipeline inputs to different
185
186
  sources (such as constant values, endpoint inputs, or environment
186
187
  variables). See :class:`InputSource` for more details.
187
- For endpoint rules, if an input of the step in the pipeline is not
188
- explicitly mapped, it will be automatically mapped to an endpoint
189
- input with the same name.
190
- For periodic rules, all inputs of the step in the pipeline must be
191
- explicitly mapped.
188
+ For endpoint rules, if an input of the pipeline is not explicitly mapped, it
189
+ will be automatically mapped to an endpoint input with the same name.
190
+ For periodic rules, all inputs of the pipeline must be explicitly mapped.
192
191
  outputs_mapping(:obj:`list` of instances of :class:`OutputDestination`):
193
192
  List of output mappings, to map pipeline outputs to different
194
193
  destinations. See :class:`OutputDestination` for more details.
195
- For endpoint rules, if an output of the step in the pipeline is not
196
- explicitly mapped, it will be automatically mapped to an endpoint
197
- output with the same name.
198
- For periodic rules, all outputs of the step in the pipeline must be
199
- explicitly mapped.
194
+ For endpoint rules, if an output of the pipeline is not explicitly mapped,
195
+ it will be automatically mapped to an endpoint output with the same name.
196
+ For periodic rules, all outputs of the pipeline must be explicitly mapped.
200
197
  description (:obj:`str`, optional): Description of the deployment.
201
198
  enable_parallel_executions (:obj:`bool`, optional):
202
199
  .. _enable_parallel_executions:
@@ -263,44 +260,44 @@ def create_deployment(
263
260
  * ``"inputs_mapping"`` (:obj:`list` of :obj:`dict`): List of inputs
264
261
  mapping represented as :obj:`dict` with the following keys:
265
262
 
266
- * ``"pipeline_input_name"`` (:obj:`str`): Name of the step input.
267
- * ``"data_type"`` (:obj:`str`): Data type of the step input.
268
- * ``"description"`` (:obj:`str`): Description of the step input.
269
- * ``"constant_value"`` (:obj:`str`): Constant value of the step input.
270
- Note that this key is only returned if the step input is mapped to a
263
+ * ``"pipeline_input_name"`` (:obj:`str`): Name of the pipeline input.
264
+ * ``"data_type"`` (:obj:`str`): Data type of the pipeline input.
265
+ * ``"description"`` (:obj:`str`): Description of the pipeline input.
266
+ * ``"constant_value"`` (:obj:`str`): Constant value of the pipeline input.
267
+ Note that this key is only returned if the pipeline input is mapped to a
271
268
  constant value.
272
269
  * ``"environment_variable_name"`` (:obj:`str`): Name of the environment
273
- variable. Note that this key is only returned if the step input is
270
+ variable. Note that this key is only returned if the pipeline input is
274
271
  mapped to an environment variable.
275
272
  * ``"endpoint_input_name"`` (:obj:`str`): Name of the endpoint input.
276
- Note that this key is only returned if the step input is mapped to an
273
+ Note that this key is only returned if the pipeline input is mapped to an
277
274
  endpoint input.
278
- * ``"is_null"`` (:obj:`bool`): Whether the step input is mapped to null.
279
- Note that this key is only returned if the step input is mapped to
275
+ * ``"is_null"`` (:obj:`bool`): Whether the pipeline input is mapped to null.
276
+ Note that this key is only returned if the pipeline input is mapped to
280
277
  null.
281
- * ``"datastore_path"`` (:obj:`str`): Datastore path of the step input.
282
- Note that this key is only returned if the step input is mapped to the
278
+ * ``"datastore_path"`` (:obj:`str`): Datastore path of the pipeline input.
279
+ Note that this key is only returned if the pipeline input is mapped to the
283
280
  datastore.
284
- * ``"is_required"`` (:obj:`bool`): Whether the step input is required.
285
- Note that this key is only returned if the step input is required.
286
- * ``"default_value"`` (:obj:`str`): Default value of the step input.
287
- Note that this key is only returned if the step input has a default
281
+ * ``"is_required"`` (:obj:`bool`): Whether the pipeline input is required.
282
+ Note that this key is only returned if the pipeline input is required.
283
+ * ``"default_value"`` (:obj:`str`): Default value of the pipeline input.
284
+ Note that this key is only returned if the pipeline input has a default
288
285
  value.
289
286
 
290
287
  * ``"outputs_mapping"`` (:obj:`list` of :obj:`dict`): List of outputs
291
288
  mapping represented as :obj:`dict` with the following keys:
292
289
 
293
- * ``"pipeline_output_name"`` (:obj:`str`): Name of the step output.
294
- * ``"data_type"`` (:obj:`str`): Data type of the step output.
295
- * ``"description"`` (:obj:`str`): Description of the step output.
290
+ * ``"pipeline_output_name"`` (:obj:`str`): Name of the pipeline output.
291
+ * ``"data_type"`` (:obj:`str`): Data type of the pipeline output.
292
+ * ``"description"`` (:obj:`str`): Description of the pipeline output.
296
293
  * ``"endpoint_output_name"`` (:obj:`str`): Name of the endpoint output.
297
- Note that this key is only returned if the step output is mapped to an
294
+ Note that this key is only returned if the pipeline output is mapped to an
298
295
  endpoint output.
299
- * ``"is_null"`` (:obj:`bool`): Whether the step output is mapped to null.
300
- Note that this key is only returned if the step output is mapped to
296
+ * ``"is_null"`` (:obj:`bool`): Whether the pipeline output is mapped to null.
297
+ Note that this key is only returned if the pipeline output is mapped to
301
298
  null.
302
- * ``"datastore_path"`` (:obj:`str`): Datastore path of the step output.
303
- Note that this key is only returned if the step output is mapped to
299
+ * ``"datastore_path"`` (:obj:`str`): Datastore path of the pipeline output.
300
+ Note that this key is only returned if the pipeline output is mapped to
304
301
  the datastore.
305
302
 
306
303
  * ``"endpoint_token"`` (:obj:`str`): Token of the endpoint. Note that this
@@ -523,44 +520,44 @@ def get_deployment(
523
520
  * ``"inputs_mapping"`` (:obj:`list` of :obj:`dict`): List of inputs
524
521
  mapping represented as :obj:`dict` with the following keys:
525
522
 
526
- * ``"pipeline_input_name"`` (:obj:`str`): Name of the step input.
527
- * ``"data_type"`` (:obj:`str`): Data type of the step input.
528
- * ``"description"`` (:obj:`str`): Description of the step input.
529
- * ``"constant_value"`` (:obj:`str`): Constant value of the step input.
530
- Note that this key is only returned if the step input is mapped to a
523
+ * ``"pipeline_input_name"`` (:obj:`str`): Name of the pipeline input.
524
+ * ``"data_type"`` (:obj:`str`): Data type of the pipeline input.
525
+ * ``"description"`` (:obj:`str`): Description of the pipeline input.
526
+ * ``"constant_value"`` (:obj:`str`): Constant value of the pipeline input.
527
+ Note that this key is only returned if the pipeline input is mapped to a
531
528
  constant value.
532
529
  * ``"environment_variable_name"`` (:obj:`str`): Name of the environment
533
- variable. Note that this key is only returned if the step input is
530
+ variable. Note that this key is only returned if the pipeline input is
534
531
  mapped to an environment variable.
535
532
  * ``"endpoint_input_name"`` (:obj:`str`): Name of the endpoint input.
536
- Note that this key is only returned if the step input is mapped to an
533
+ Note that this key is only returned if the pipeline input is mapped to an
537
534
  endpoint input.
538
- * ``"is_null"`` (:obj:`bool`): Whether the step input is mapped to null.
539
- Note that this key is only returned if the step input is mapped to
535
+ * ``"is_null"`` (:obj:`bool`): Whether the pipeline input is mapped to null.
536
+ Note that this key is only returned if the pipeline input is mapped to
540
537
  null.
541
- * ``"datastore_path"`` (:obj:`str`): Datastore path of the step input.
542
- Note that this key is only returned if the step input is mapped to the
538
+ * ``"datastore_path"`` (:obj:`str`): Datastore path of the pipeline input.
539
+ Note that this key is only returned if the pipeline input is mapped to the
543
540
  datastore.
544
- * ``"is_required"`` (:obj:`bool`): Whether the step input is required.
545
- Note that this key is only returned if the step input is required.
546
- * ``"default_value"`` (:obj:`str`): Default value of the step input.
547
- Note that this key is only returned if the step input has a default
541
+ * ``"is_required"`` (:obj:`bool`): Whether the pipeline input is required.
542
+ Note that this key is only returned if the pipeline input is required.
543
+ * ``"default_value"`` (:obj:`str`): Default value of the pipeline input.
544
+ Note that this key is only returned if the pipeline input has a default
548
545
  value.
549
546
 
550
547
  * ``"outputs_mapping"`` (:obj:`list` of :obj:`dict`): List of outputs
551
548
  mapping represented as :obj:`dict` with the following keys:
552
549
 
553
- * ``"pipeline_output_name"`` (:obj:`str`): Name of the step output.
554
- * ``"data_type"`` (:obj:`str`): Data type of the step output.
555
- * ``"description"`` (:obj:`str`): Description of the step output.
550
+ * ``"pipeline_output_name"`` (:obj:`str`): Name of the pipeline output.
551
+ * ``"data_type"`` (:obj:`str`): Data type of the pipeline output.
552
+ * ``"description"`` (:obj:`str`): Description of the pipeline output.
556
553
  * ``"endpoint_output_name"`` (:obj:`str`): Name of the endpoint output.
557
- Note that this key is only returned if the step output is mapped to an
554
+ Note that this key is only returned if the pipeline output is mapped to an
558
555
  endpoint output.
559
- * ``"is_null"`` (:obj:`bool`): Whether the step output is mapped to null.
560
- Note that this key is only returned if the step output is mapped to
556
+ * ``"is_null"`` (:obj:`bool`): Whether the pipeline output is mapped to null.
557
+ Note that this key is only returned if the pipeline output is mapped to
561
558
  null.
562
- * ``"datastore_path"`` (:obj:`str`): Datastore path of the step output.
563
- Note that this key is only returned if the step output is mapped to
559
+ * ``"datastore_path"`` (:obj:`str`): Datastore path of the pipeline output.
560
+ Note that this key is only returned if the pipeline output is mapped to
564
561
  the datastore.
565
562
  * ``"endpoint_token"`` (:obj:`str`): Token of the deployment. Note that this
566
563
  key is only returned if the ``execution_rule`` of the deployment is
@@ -236,21 +236,21 @@ def get_pipeline_execution(sdk: BaseCraftAiSdk, execution_id):
236
236
  execution.
237
237
  * ``"deployment_name"`` (:obj:`str`): Name of the deployment used for the
238
238
  execution.
239
- * ``"steps"`` (:obj:`list` of `obj`): List of the step executions
239
+ * ``"steps"`` (:obj:`list` of `obj`): List of the pipeline executions
240
240
  represented as :obj:`dict` with the following keys:
241
241
 
242
- * ``"name"`` (:obj:`str`): Name of the step.
243
- * ``"status"`` (:obj:`str`): Status of the step.
244
- * ``"start_date"`` (:obj:`str`): Date of start of the step execution.
245
- * ``"end_date"`` (:obj:`str`): Date of completion of the step execution.
242
+ * ``"name"`` (:obj:`str`): Name of the pipeline.
243
+ * ``"status"`` (:obj:`str`): Status of the pipeline.
244
+ * ``"start_date"`` (:obj:`str`): Date of start of the pipeline execution.
245
+ * ``"end_date"`` (:obj:`str`): Date of completion of the pipeline execution.
246
246
  * ``"commit_id"`` (:obj:`str`): Id of the commit used to build the
247
- step.
247
+ pipeline.
248
248
  * ``"repository_url"`` (:obj:`str`): Url of the repository used to
249
- build the step.
249
+ build the pipeline.
250
250
  * ``"repository_branch"`` (:obj:`str`): Branch of the repository used
251
- to build the step.
251
+ to build the pipeline.
252
252
  * ``"requirements_path"`` (:obj:`str`): Path of the requirements.txt file.
253
- * ``"origin"`` (:obj:`str`): The origin of the step, can be
253
+ * ``"origin"`` (:obj:`str`): The origin of the pipeline, can be
254
254
  ``"git_repository"`` or ``"local"``.
255
255
  * ``"inputs"`` (:obj:`list` of :obj:`dict`): List of inputs represented
256
256
  as a dict with the following keys:
@@ -460,12 +460,12 @@ def get_pipeline_execution_logs(
460
460
  sdk,
461
461
  "Please wait while logs are being fetched. This may take a while...",
462
462
  )
463
- logs_by_steps = sdk._post(url, json=data)
463
+ logs_by_pipelines = sdk._post(url, json=data)
464
464
 
465
- if len(logs_by_steps) == 0:
465
+ if len(logs_by_pipelines) == 0:
466
466
  return []
467
467
 
468
- return logs_by_steps[0]
468
+ return logs_by_pipelines[0]
469
469
 
470
470
 
471
471
  def delete_pipeline_execution(sdk: BaseCraftAiSdk, execution_id):
@@ -28,7 +28,7 @@ class ListMetric(TypedDict):
28
28
  @log_func_result("Pipeline metrics definition", get_execution_id)
29
29
  def record_metric_value(sdk: BaseCraftAiSdk, name: str, value: float):
30
30
  """Create or update a pipeline metric. Note that this function can only be used
31
- inside a step code.
31
+ inside a pipeline code.
32
32
 
33
33
  Args:
34
34
  name (:obj:`str`): Name of the metric to store.
@@ -39,9 +39,9 @@ def record_metric_value(sdk: BaseCraftAiSdk, name: str, value: float):
39
39
  """
40
40
 
41
41
  if not get_execution_id():
42
- if sdk.warn_on_metric_outside_of_step:
42
+ if sdk.warn_on_metric_outside_of_pipeline:
43
43
  warnings.warn(
44
- "You cannot send a metric outside a step code, the metric has not \
44
+ "You cannot send a metric outside a pipeline code, the metric has not \
45
45
  been sent",
46
46
  stacklevel=2,
47
47
  )
@@ -55,7 +55,7 @@ been sent",
55
55
  @log_func_result("Pipeline list metric definition", get_execution_id)
56
56
  def record_list_metric_values(sdk: BaseCraftAiSdk, name: str, values: list[float]):
57
57
  """Add values to a pipeline metric list. Note that this function can only be
58
- used inside a step code.
58
+ used inside a pipeline code.
59
59
 
60
60
  Args:
61
61
  name (:obj:`str`):
@@ -68,9 +68,9 @@ def record_list_metric_values(sdk: BaseCraftAiSdk, name: str, values: list[float
68
68
  """
69
69
 
70
70
  if not get_execution_id():
71
- if sdk.warn_on_metric_outside_of_step:
71
+ if sdk.warn_on_metric_outside_of_pipeline:
72
72
  warnings.warn(
73
- "You cannot send a metric outside a step code, the metric has not \
73
+ "You cannot send a metric outside a pipeline code, the metric has not \
74
74
  been sent",
75
75
  stacklevel=2,
76
76
  )
@@ -8,6 +8,7 @@ import requests
8
8
  from typing_extensions import NotRequired
9
9
 
10
10
  from craft_ai_sdk.shared.types import Log
11
+ from craft_ai_sdk.shared.warnings import deprecated
11
12
 
12
13
  from ..constants import CREATION_PARAMETER_VALUE
13
14
  from ..io import Input, Output
@@ -207,6 +208,7 @@ def _remove_id_from_step(step):
207
208
 
208
209
 
209
210
  @log_func_result("Steps creation")
211
+ @deprecated
210
212
  def create_step(
211
213
  sdk: BaseCraftAiSdk,
212
214
  step_name: str,
@@ -379,6 +381,7 @@ def create_step(
379
381
  return get_step(sdk, step_name, wait_for_completion, timeout_s)
380
382
 
381
383
 
384
+ @deprecated
382
385
  def get_step(
383
386
  sdk: BaseCraftAiSdk,
384
387
  step_name: str,
@@ -473,6 +476,7 @@ def get_step(
473
476
  return _remove_id_from_step(step)
474
477
 
475
478
 
479
+ @deprecated
476
480
  def list_steps(sdk: BaseCraftAiSdk) -> list[StepListItem]:
477
481
  """Get the list of all steps.
478
482
 
@@ -490,6 +494,7 @@ def list_steps(sdk: BaseCraftAiSdk) -> list[StepListItem]:
490
494
 
491
495
 
492
496
  @log_func_result("Step deletion")
497
+ @deprecated
493
498
  def delete_step(
494
499
  sdk: BaseCraftAiSdk, step_name: str, force_dependents_deletion=False
495
500
  ) -> StepDeleted:
@@ -522,6 +527,7 @@ def _get_download_presigned_url(sdk: BaseCraftAiSdk, step_name: str) -> str:
522
527
 
523
528
 
524
529
  @log_func_result("Step download")
530
+ @deprecated
525
531
  def download_step_local_folder(sdk: BaseCraftAiSdk, step_name: str, folder: str):
526
532
  """Download a step's local folder as a `.tgz` archive.
527
533
 
@@ -550,6 +556,7 @@ def download_step_local_folder(sdk: BaseCraftAiSdk, step_name: str, folder: str)
550
556
 
551
557
 
552
558
  @log_func_result("Step logs")
559
+ @deprecated
553
560
  def get_step_logs(
554
561
  sdk: BaseCraftAiSdk,
555
562
  step_name: str,
@@ -24,7 +24,7 @@ class BaseCraftAiSdk(ABC):
24
24
  _MULTIPART_PART_SIZE: int
25
25
  _version: str
26
26
  _session: requests.Session
27
- warn_on_metric_outside_of_step: bool
27
+ warn_on_metric_outside_of_pipeline: bool
28
28
 
29
29
  @abstractmethod
30
30
  def _get(self, url: str, params=None, **kwargs) -> Any:
@@ -57,8 +57,8 @@ class CraftAiSdk(BaseCraftAiSdk):
57
57
  base_control_api_url (:obj:`str`): Base URL to CraftAI authorization server API.
58
58
  verbose_log (bool): If True, information during method execution will be
59
59
  printed.
60
- warn_on_metric_outside_of_step (bool): If True, a warning will be printed when
61
- a metric is added outside of a step.
60
+ warn_on_metric_outside_of_pipeline (bool): If True, a warning will be printed
61
+ when a metric is added outside of a pipeline.
62
62
  """
63
63
 
64
64
  from .core.data_store import (
@@ -139,7 +139,7 @@ class CraftAiSdk(BaseCraftAiSdk):
139
139
  os.environ.get("CRAFT_AI__MULTIPART_PART_SIZE__B", str(38 * 256 * 1024))
140
140
  )
141
141
  _access_token_margin = timedelta(seconds=30)
142
- _version = "0.66.1rc1" # Would be better to share it somewhere
142
+ _version = "0.67.0" # Would be better to share it somewhere
143
143
 
144
144
  def __init__(
145
145
  self,
@@ -147,7 +147,7 @@ class CraftAiSdk(BaseCraftAiSdk):
147
147
  environment_url=None,
148
148
  control_url=None,
149
149
  verbose_log=None,
150
- warn_on_metric_outside_of_step=True,
150
+ warn_on_metric_outside_of_pipeline=True,
151
151
  ):
152
152
  """Inits CraftAiSdk.
153
153
 
@@ -166,8 +166,8 @@ class CraftAiSdk(BaseCraftAiSdk):
166
166
  Defaults to ``True`` if the environment variable ``SDK_VERBOSE_LOG`` is
167
167
  set to ``true``; ``False`` if it is set to ``false``; else, defaults to
168
168
  ``True`` in interactive mode; ``False`` otherwise.
169
- warn_on_metric_outside_of_step (:obj:`bool`, optional): If ``True``, a
170
- warning will be raised when a metric is added outside of a step.
169
+ warn_on_metric_outside_of_pipeline (:obj:`bool`, optional): If ``True``, a
170
+ warning will be raised when a metric is added outside of a pipeline.
171
171
  Defaults to ``True``.
172
172
 
173
173
  Raises:
@@ -222,8 +222,8 @@ class CraftAiSdk(BaseCraftAiSdk):
222
222
  )
223
223
  self.verbose_log = verbose_log
224
224
 
225
- # Set warn_on_metric_outside_of_step
226
- self.warn_on_metric_outside_of_step = warn_on_metric_outside_of_step
225
+ # Set warn_on_metric_outside_of_pipeline
226
+ self.warn_on_metric_outside_of_pipeline = warn_on_metric_outside_of_pipeline
227
227
 
228
228
  # _____ REQUESTS METHODS _____
229
229
 
@@ -305,13 +305,13 @@ class CraftAiSdk(BaseCraftAiSdk):
305
305
  }
306
306
 
307
307
  @property
308
- def warn_on_metric_outside_of_step(self):
308
+ def warn_on_metric_outside_of_pipeline(self):
309
309
  """Whether a warning should be raised when a metric is added outside of a
310
- step."""
311
- return self._warn_on_metric_outside_of_step
310
+ pipeline."""
311
+ return self._warn_on_metric_outside_of_pipeline
312
312
 
313
- @warn_on_metric_outside_of_step.setter
314
- def warn_on_metric_outside_of_step(self, value):
313
+ @warn_on_metric_outside_of_pipeline.setter
314
+ def warn_on_metric_outside_of_pipeline(self, value):
315
315
  if not isinstance(value, bool):
316
- raise TypeError("warn_on_metric_outside_of_step must be a boolean")
317
- self._warn_on_metric_outside_of_step = value
316
+ raise TypeError("warn_on_metric_outside_of_pipeline must be a boolean")
317
+ self._warn_on_metric_outside_of_pipeline = value
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "craft-ai-sdk"
3
- version = "0.66.1rc1"
3
+ version = "0.67.0"
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