dtlpy 1.101.8__py3-none-any.whl → 1.102.14__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.
dtlpy/__version__.py CHANGED
@@ -1 +1 @@
1
- version = '1.101.8'
1
+ version = '1.102.14'
dtlpy/entities/app.py CHANGED
@@ -132,7 +132,7 @@ class App(entities.BaseEntity):
132
132
  return self.apps.pause(self)
133
133
 
134
134
  @staticmethod
135
- def _protected_from_json(_json, client_api, project, is_fetched=True):
135
+ def _protected_from_json(_json, client_api, project=None, is_fetched=True):
136
136
  """
137
137
  Same as from_json but with try-except to catch if error
138
138
 
@@ -193,7 +193,7 @@ class App(entities.BaseEntity):
193
193
  return _json
194
194
 
195
195
  @classmethod
196
- def from_json(cls, _json, client_api: ApiClient, project: entities.Project, is_fetched=True):
196
+ def from_json(cls, _json, client_api: ApiClient, project: entities.Project=None, is_fetched=True):
197
197
  app = cls(
198
198
  id=_json.get('id', None),
199
199
  name=_json.get('name', None),
@@ -34,6 +34,8 @@ class IntegrationType(str, Enum):
34
34
  - KEY VALUE Integration - for save secrets in the platform
35
35
  * - GCP_WORKLOAD_IDENTITY_FEDERATION
36
36
  - GCP Workload Identity Federation Integration - for GCP drivers
37
+ * - PRIVATE_REGISTRY
38
+ - PRIVATE REGISTRY Integration - for private registry drivers
37
39
  """
38
40
  S3 = "s3"
39
41
  AWS_CROSS_ACCOUNT = 'aws-cross'
@@ -42,7 +44,8 @@ class IntegrationType(str, Enum):
42
44
  GCS_CROSS = "gcp-cross"
43
45
  AZUREBLOB = "azureblob"
44
46
  KEY_VALUE = "key_value"
45
- GCP_WORKLOAD_IDENTITY_FEDERATION = "gcp-workload-identity-federation"
47
+ GCP_WORKLOAD_IDENTITY_FEDERATION = "gcp-workload-identity-federation",
48
+ PRIVATE_REGISTRY = "private-registry"
46
49
 
47
50
 
48
51
  @attr.s
dtlpy/entities/model.py CHANGED
@@ -119,7 +119,7 @@ class Model(entities.BaseEntity):
119
119
  app = attr.ib(default=None)
120
120
 
121
121
  @staticmethod
122
- def _protected_from_json(_json, client_api, project, package, is_fetched=True):
122
+ def _protected_from_json(_json, client_api, project=None, package=None, is_fetched=True):
123
123
  """
124
124
  Same as from_json but with try-except to catch if error
125
125
 
@@ -143,7 +143,7 @@ class Model(entities.BaseEntity):
143
143
  return status, model
144
144
 
145
145
  @classmethod
146
- def from_json(cls, _json, client_api, project, package, is_fetched=True):
146
+ def from_json(cls, _json, client_api, project=None, package=None, is_fetched=True):
147
147
  """
148
148
  Turn platform representation of model into a model entity
149
149
 
@@ -185,7 +185,7 @@ class Ontology(entities.BaseEntity):
185
185
  self._color_map = values
186
186
 
187
187
  @staticmethod
188
- def _protected_from_json(_json, client_api, recipe, dataset, project, is_fetched=True):
188
+ def _protected_from_json(_json, client_api, recipe=None, dataset=None, project=None, is_fetched=True):
189
189
  """
190
190
  Same as from_json but with try-except to catch if error
191
191
  :param _json: platform json
@@ -217,7 +217,7 @@ class Ontology(entities.BaseEntity):
217
217
  return True
218
218
 
219
219
  @classmethod
220
- def from_json(cls, _json, client_api, recipe, dataset=None, project=None, is_fetched=True):
220
+ def from_json(cls, _json, client_api, recipe=None, dataset=None, project=None, is_fetched=True):
221
221
  """
222
222
  Build an Ontology entity object from a json
223
223
 
dtlpy/entities/package.py CHANGED
@@ -124,7 +124,7 @@ class Package(entities.DlEntity):
124
124
  self.codebase = entities.ItemCodebase(item_id=item_id)
125
125
 
126
126
  @staticmethod
127
- def _protected_from_json(_json, client_api, project, is_fetched=True):
127
+ def _protected_from_json(_json, client_api, project=None, is_fetched=True):
128
128
  """
129
129
  Same as from_json but with try-except to catch if error
130
130
 
@@ -144,7 +144,7 @@ class Package(entities.DlEntity):
144
144
  return status, package
145
145
 
146
146
  @classmethod
147
- def from_json(cls, _json, client_api, project, is_fetched=True):
147
+ def from_json(cls, _json, client_api, project=None, is_fetched=True):
148
148
  """
149
149
  Turn platform representation of package into a package entity
150
150
 
@@ -232,11 +232,12 @@ class Pipeline(entities.BaseEntity):
232
232
  updated_by = attr.ib(default=None)
233
233
 
234
234
  @staticmethod
235
- def _protected_from_json(_json, client_api, project, is_fetched=True):
235
+ def _protected_from_json(_json, client_api, project=None, is_fetched=True):
236
236
  """
237
237
  Same as from_json but with try-except to catch if error
238
238
  :param _json: platform json
239
239
  :param client_api: ApiClient entity
240
+ :param dtlpy.entities.project.Project project: entity
240
241
  :param is_fetched: is Entity fetched from Platform
241
242
  :return:
242
243
  """
@@ -254,13 +255,13 @@ class Pipeline(entities.BaseEntity):
254
255
  return status, pipeline
255
256
 
256
257
  @classmethod
257
- def from_json(cls, _json, client_api, project, is_fetched=True):
258
+ def from_json(cls, _json, client_api, project=None, is_fetched=True):
258
259
  """
259
260
  Turn platform representation of pipeline into a pipeline entity
260
261
 
261
262
  :param dict _json: platform representation of package
262
263
  :param dl.ApiClient client_api: ApiClient entity
263
- :param dtlpy.entities.project.Project project: project entity
264
+ :param dtlpy.entities.project.Project project: entity
264
265
  :param bool is_fetched: is Entity fetched from Platform
265
266
  :return: Pipeline entity
266
267
  :rtype: dtlpy.entities.pipeline.Pipeline
@@ -308,7 +309,7 @@ class Pipeline(entities.BaseEntity):
308
309
  return inst
309
310
 
310
311
  @classmethod
311
- def pipeline_node(self, _json):
312
+ def pipeline_node(cls, _json):
312
313
  node_type = _json.get('type')
313
314
  if node_type == 'task':
314
315
  return TaskNode.from_json(_json)
@@ -91,7 +91,7 @@ class PipelineExecution(entities.BaseEntity):
91
91
  _repositories = attr.ib(repr=False)
92
92
 
93
93
  @staticmethod
94
- def _protected_from_json(_json, client_api, pipeline, is_fetched=True):
94
+ def _protected_from_json(_json, client_api, pipeline=None, is_fetched=True):
95
95
  """
96
96
  Same as from_json but with try-except to catch if error
97
97
  :param _json: platform json
@@ -114,7 +114,7 @@ class PipelineExecution(entities.BaseEntity):
114
114
  return status, pipeline
115
115
 
116
116
  @classmethod
117
- def from_json(cls, _json, client_api, pipeline, is_fetched=True) -> 'PipelineExecution':
117
+ def from_json(cls, _json, client_api, pipeline=None, is_fetched=True) -> 'PipelineExecution':
118
118
  """
119
119
  Turn platform representation of pipeline_execution into a pipeline_execution entity
120
120
 
dtlpy/entities/recipe.py CHANGED
@@ -57,7 +57,7 @@ class Recipe(entities.BaseEntity):
57
57
  Build a Recipe entity object from a json
58
58
 
59
59
  :param dict _json: _json response from host
60
- :param dtlpy.entities.dataset.Dataset Dataset: Dataset entity
60
+ :param dtlpy.entities.dataset.Dataset dataset: Dataset entity
61
61
  :param dtlpy.entities.project.Project project: project entity
62
62
  :param dl.ApiClient client_api: ApiClient entity
63
63
  :param bool is_fetched: is Entity fetched from Platform
dtlpy/entities/task.py CHANGED
@@ -116,7 +116,7 @@ class Task:
116
116
  self._description['content'] = description
117
117
 
118
118
  @staticmethod
119
- def _protected_from_json(_json, client_api, project, dataset):
119
+ def _protected_from_json(_json, client_api, project=None, dataset=None):
120
120
  """
121
121
  Same as from_json but with try-except to catch if error
122
122
 
dtlpy/entities/trigger.py CHANGED
@@ -119,7 +119,7 @@ class BaseTrigger(entities.BaseEntity):
119
119
  return self.updated_at
120
120
 
121
121
  @staticmethod
122
- def _protected_from_json(_json, client_api, project, service=None):
122
+ def _protected_from_json(_json, client_api, project=None, service=None):
123
123
  """
124
124
  Same as from_json but with try-except to catch if error
125
125
 
@@ -141,7 +141,7 @@ class BaseTrigger(entities.BaseEntity):
141
141
  return status, trigger
142
142
 
143
143
  @classmethod
144
- def from_json(cls, _json, client_api, project, service=None):
144
+ def from_json(cls, _json, client_api, project=None, service=None):
145
145
  """
146
146
  Build a trigger entity object from a json
147
147
 
@@ -305,7 +305,7 @@ class Trigger(BaseTrigger):
305
305
  return _json
306
306
 
307
307
  @classmethod
308
- def from_json(cls, _json, client_api, project, service=None):
308
+ def from_json(cls, _json, client_api, project=None, service=None):
309
309
  """
310
310
  Build a trigger entity object from a json
311
311
 
@@ -377,7 +377,7 @@ class CronTrigger(BaseTrigger):
377
377
  return _json
378
378
 
379
379
  @classmethod
380
- def from_json(cls, _json, client_api, project, service=None):
380
+ def from_json(cls, _json, client_api, project=None, service=None):
381
381
  """
382
382
  Build a trigger entity object from a json
383
383
 
@@ -486,7 +486,7 @@ class BaseModelAdapter(utilities.BaseServiceRunner):
486
486
  if feature_set is None:
487
487
  logger.info('Feature Set not found. creating... ')
488
488
  try:
489
- self.model_entity.project.feature_sets.get(name=self.model_entity.name)
489
+ self.model_entity.project.feature_sets.get(feature_set_name=self.model_entity.name)
490
490
  feature_set_name = f"{self.model_entity.name}-{''.join(random.choices(string.ascii_letters + string.digits, k=5))}"
491
491
  logger.warning(f"Feature set with the model name already exists. Creating new feature set with name {feature_set_name}")
492
492
  except exceptions.NotFound:
@@ -196,8 +196,13 @@ class Dpks:
196
196
  dpk = dpk_v.items[0]
197
197
  return dpk
198
198
 
199
- def publish(self, dpk: entities.Dpk = None, ignore_max_file_size: bool = False,
200
- manifest_filepath='dataloop.json') -> entities.Dpk:
199
+ def publish(
200
+ self,
201
+ dpk: entities.Dpk = None,
202
+ ignore_max_file_size: bool = False,
203
+ manifest_filepath='dataloop.json',
204
+ local_path: str = None
205
+ ) -> entities.Dpk:
201
206
  """
202
207
  Upload a dpk entity to the dataloop platform.
203
208
 
@@ -207,6 +212,7 @@ class Dpks:
207
212
  during the packaging of the codebase.
208
213
  :param str manifest_filepath: Optional. Path to the manifest file. Can be absolute or relative.
209
214
  Defaults to 'dataloop.json'
215
+ :param str local_path: Optional. The path where the dpk files are located.
210
216
 
211
217
  :return the published dpk
212
218
  :rtype dl.entities.Dpk
@@ -241,8 +247,13 @@ class Dpks:
241
247
  if self.project and self.project.id != dpk.context['project']:
242
248
  logger.warning("the project id that provide different from the dpk project id")
243
249
 
250
+ if local_path is None:
251
+ if manifest_filepath=='dataloop.json':
252
+ local_path = os.getcwd()
253
+ else:
254
+ local_path = os.path.dirname(manifest_filepath)
244
255
  if dpk.codebase is None:
245
- dpk.codebase = self.project.codebases.pack(directory=os.getcwd(),
256
+ dpk.codebase = self.project.codebases.pack(directory=local_path,
246
257
  name=dpk.display_name,
247
258
  extension='dpk',
248
259
  ignore_directories=['artifacts'],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dtlpy
3
- Version: 1.101.8
3
+ Version: 1.102.14
4
4
  Summary: SDK and CLI for Dataloop platform
5
5
  Home-page: https://github.com/dataloop-ai/dtlpy
6
6
  Author: Dataloop Team
@@ -1,5 +1,5 @@
1
1
  dtlpy/__init__.py,sha256=1Zngp5ftTgWb3r-sc8z98TYpEs6fOB_7snFhsXYQLVg,20899
2
- dtlpy/__version__.py,sha256=Ozzlk4O9Dg2923lh6fsAFvrBcMuihy5L2HWDivhCqaA,20
2
+ dtlpy/__version__.py,sha256=82fpG2J9U-IcmpwkJvq1am0FxF4AGGDMXe7Jqv7JIi4,21
3
3
  dtlpy/exceptions.py,sha256=EQCKs3pwhwZhgMByQN3D3LpWpdxwcKPEEt-bIaDwURM,2871
4
4
  dtlpy/new_instance.py,sha256=u_c6JtgqsKCr7TU24-g7_CaST9ghqamMhM4Z0Zxt50w,10121
5
5
  dtlpy/assets/__init__.py,sha256=D_hAa6NM8Zoy32sF_9b7m0b7I-BQEyBFg8-9Tg2WOeo,976
@@ -48,7 +48,7 @@ dtlpy/entities/__init__.py,sha256=Sihb652vYCyCWSQfiYTEGQW0EJsHe7BTk6-S5DOsAb0,49
48
48
  dtlpy/entities/analytic.py,sha256=5MpYDKPVsZ1MIy20Ju515RWed6P667j4TLxsan2gyNM,11925
49
49
  dtlpy/entities/annotation.py,sha256=sqgnONKbNb9gmPLJBH3mYJhFWeKjoiJ8dt57Cz7C6YA,67020
50
50
  dtlpy/entities/annotation_collection.py,sha256=CEYSBHhhDkC0VJdHsBSrA6TgdKGMcKeI3tFM40UJwS8,29838
51
- dtlpy/entities/app.py,sha256=LQ0cDuqeNtO7iihrTq8MBLrFbZiDVs6AFoAi4UQtUZY,6958
51
+ dtlpy/entities/app.py,sha256=dVd87-mP22NWvec5nqA5VjZ8Qk3aJlgUcloIAAOAPUw,6968
52
52
  dtlpy/entities/app_module.py,sha256=0UiAbBX1q8iEImi3nY7ySWZZHoRRwu0qUXmyXmgVAc4,3645
53
53
  dtlpy/entities/artifact.py,sha256=wtLtBuidOPbnba0ok40JyunCCIBGbAl4bP_ebK39Kk4,5711
54
54
  dtlpy/entities/assignment.py,sha256=Dc1QcfVf67GGcmDDi4ubESDuPkSgjXqdqjTBQ31faUM,14722
@@ -66,33 +66,33 @@ dtlpy/entities/feature.py,sha256=9fFjD0W57anOVSAVU55ypxN_WTCsWTG03Wkc3cAAj78,373
66
66
  dtlpy/entities/feature_set.py,sha256=niw4MkmrDbD_LWQu1X30uE6U4DCzmFhPTaYeZ6VZDB0,4443
67
67
  dtlpy/entities/filters.py,sha256=_A7rLc0yuMw1eW4gSu4-hogQzXbNUheRvFxnTQWntuo,22671
68
68
  dtlpy/entities/gis_item.py,sha256=Uk-wMBxwcHsImjz4qOjP-EyZAohbRzN43kMpCaVjCXU,3982
69
- dtlpy/entities/integration.py,sha256=CA5F1eQCGE_4c_Kry4nWRdeyjHctNnvexcDXg_M5HLU,5734
69
+ dtlpy/entities/integration.py,sha256=j2rbAo__XKOSYJqX9wUYmPtuV4lnbmqEjA0WCrag92k,5876
70
70
  dtlpy/entities/item.py,sha256=UnAZ7yLaTu2vkbD2sxysJQNn-ceC9zS3Uf304OvcC4E,31746
71
71
  dtlpy/entities/label.py,sha256=ycDYavIgKhz806plIX-64c07_TeHpDa-V7LnfFVe4Rg,3869
72
72
  dtlpy/entities/links.py,sha256=FAmEwHtsrqKet3c0UHH9u_gHgG6_OwF1-rl4xK7guME,2516
73
73
  dtlpy/entities/message.py,sha256=ApJuaKEqxATpXjNYUjGdYPu3ibQzEMo8-LtJ_4xAcPI,5865
74
- dtlpy/entities/model.py,sha256=EeJsCePIddavvMVhyNGt6ZIsyteucQoI0cY6byPOi9Y,26878
74
+ dtlpy/entities/model.py,sha256=YwjIi3MxAZoyartTvqx_qhtDKQe6zVsQuwZbYLygMxU,26898
75
75
  dtlpy/entities/node.py,sha256=yPPYDLtNMc6vZbbf4FIffY86y7tkaTvYm42Jb7k3Ofk,39617
76
- dtlpy/entities/ontology.py,sha256=ok4p3sLBc_SS5hs2gZr5-gbblrveM7qSIX4z67QSKeQ,31967
76
+ dtlpy/entities/ontology.py,sha256=N5bsnNUfWNN49WV8lGQL8QRxbKfCZyV-rDyTlGByUrw,31987
77
77
  dtlpy/entities/organization.py,sha256=AMkx8hNIIIjnu5pYlNjckMRuKt6H3lnOAqtEynkr7wg,9893
78
- dtlpy/entities/package.py,sha256=EA5cB3nFBlsbxVK-QroZILjol2bYSVGqCby-mOyJJjQ,26353
78
+ dtlpy/entities/package.py,sha256=QSDePHlp4ik19aUE3dAUC7edh0oUUVjzSmMG867avc4,26363
79
79
  dtlpy/entities/package_defaults.py,sha256=wTD7Z7rGYjVy8AcUxTFEnkOkviiJaLVZYvduiUBKNZo,211
80
80
  dtlpy/entities/package_function.py,sha256=M42Kvw9A8b6msAkv-wRNAQg_-UC2bejniCjeKDugudc,6314
81
81
  dtlpy/entities/package_module.py,sha256=cOkIITATkzzCQpE0sdPiBUisAz8ImlPG2YGZ0K7SypA,5151
82
82
  dtlpy/entities/package_slot.py,sha256=XBwCodQe618sQm0bmx46Npo94mEk-zUV7ZX0mDRcsD8,3946
83
83
  dtlpy/entities/paged_entities.py,sha256=grNjt2FYg4gKBlVRDkztI1BPOI4JoGeyjvmOW3BnB3k,5927
84
- dtlpy/entities/pipeline.py,sha256=X9238WbMGfZcXdQVEtkw8twZwl0O4EZB4TxbTSEyPeI,20788
85
- dtlpy/entities/pipeline_execution.py,sha256=XCXlBAHFYVL2HajE71hK-bPxI4gTwZvg5SKri4BgyRA,9928
84
+ dtlpy/entities/pipeline.py,sha256=JtWGoCUhVszOVkBNK43fbTt446fkND4wH-Y-fN_llww,20851
85
+ dtlpy/entities/pipeline_execution.py,sha256=EQhW4W_G1bIPShYbJSAT--1WNQuvxVQbcQ_MCHIX0KI,9938
86
86
  dtlpy/entities/project.py,sha256=ZUx8zA3mr6N145M62R3UDPCCzO1vxfyWO6vjES-bO-g,14653
87
87
  dtlpy/entities/prompt_item.py,sha256=d4rqP961PYlJvJJDRXZPI7Z6NdwRXlx_Q0_N0xtZ_B8,19276
88
- dtlpy/entities/recipe.py,sha256=Q1HtYgind3bEe-vnDZWhw6H-rcIAGhkGHPRWtLIkPSE,11917
88
+ dtlpy/entities/recipe.py,sha256=SX0T7gw-_9Cs2FZyC_htIxQd7CwDwb2zA3SqB37vymM,11917
89
89
  dtlpy/entities/reflect_dict.py,sha256=2NaSAL-CO0T0FYRYFQlaSpbsoLT2Q18AqdHgQSLX5Y4,3273
90
90
  dtlpy/entities/resource_execution.py,sha256=1HuVV__U4jAUOtOkWlWImnM3Yts8qxMSAkMA9sBhArY,5033
91
91
  dtlpy/entities/service.py,sha256=NI4lFC6FqLw4aEGarr2rMptxe3omVfC39C9VAnYYEJA,33733
92
92
  dtlpy/entities/setting.py,sha256=uXagJHtcCR3nJYClR_AUGZjz_kx3TejPcUZ8ginHFIA,8561
93
- dtlpy/entities/task.py,sha256=XHiEqZYFlrDCtmw1MXsysjoBLdIzAk7coMrVk8bNIiE,19534
93
+ dtlpy/entities/task.py,sha256=SL1-6p4jruELkWI-5VXBMn7Imj1xJVaOfAFDa7inH64,19544
94
94
  dtlpy/entities/time_series.py,sha256=336jWNckjuSn0G29WJFetB7nBoFAKqs4VH9_IB4m4FE,4017
95
- dtlpy/entities/trigger.py,sha256=zh3wYUY2-zATh_7ous0Ck87Yojo9r9PAVQrkcESxoko,14266
95
+ dtlpy/entities/trigger.py,sha256=Spf5G3n1PsD3mDntwbAsc-DpEGDlqKgU9ec0Q0HinsQ,14286
96
96
  dtlpy/entities/user.py,sha256=hqEzwN6rl1oUTpKOV5eXvw9Z7dtpsiC4TAPSNBmkqcM,3865
97
97
  dtlpy/entities/webhook.py,sha256=6R06MgLxabvKySInGlSJmaf0AVmAMe3vKusWhqONRyU,3539
98
98
  dtlpy/entities/annotation_definitions/__init__.py,sha256=qZ77hGmCQopPSpiDHYhNWbNKC7nrn10NWNlim9dINmg,666
@@ -148,7 +148,7 @@ dtlpy/miscellaneous/list_print.py,sha256=leEg3RodgYfH5t_0JG8VuM8NiesR8sJLK_mRStt
148
148
  dtlpy/miscellaneous/zipping.py,sha256=GMdPhAeHQXeMS5ClaiKWMJWVYQLBLAaJUWxvdYrL4Ro,5337
149
149
  dtlpy/ml/__init__.py,sha256=vPkyXpc9kcWWZ_PxyPEOsjKBJdEbowLkZr8FZIb_OBM,799
150
150
  dtlpy/ml/base_feature_extractor_adapter.py,sha256=iiEGYAx0Rdn4K46H_FlKrAv3ebTXHSxNVAmio0BxhaI,1178
151
- dtlpy/ml/base_model_adapter.py,sha256=y7txv5JdTpVCZY6IvYXiQRSz4k3YXhHFEKoDTkcVHz0,50610
151
+ dtlpy/ml/base_model_adapter.py,sha256=FMM1LknEYN69yW12A1f0x6BywdxKteVE_9MuQiryDYo,50622
152
152
  dtlpy/ml/metrics.py,sha256=BG2E-1Mvjv2e2No9mIJKVmvzqBvLqytKcw3hA7wVUNc,20037
153
153
  dtlpy/ml/predictions_utils.py,sha256=He_84U14oS2Ss7T_-Zj5GDiBZwS-GjMPURUh7u7DjF8,12484
154
154
  dtlpy/ml/summary_writer.py,sha256=dehDi8zmGC1sAGyy_3cpSWGXoGQSiQd7bL_Thoo8yIs,2784
@@ -166,7 +166,7 @@ dtlpy/repositories/compositions.py,sha256=H417BvlQAiWr5NH2eANFke6CfEO5o7DSvapYpf
166
166
  dtlpy/repositories/computes.py,sha256=EtfE_3JhTdNlSYDPkKXBFkq-DBl4sgQqIm50ajvFdWM,9976
167
167
  dtlpy/repositories/datasets.py,sha256=SpG86uToq-E5nVHMwHgWx6VwwwkgfYo8x5vZ0WA3Ouw,56546
168
168
  dtlpy/repositories/downloader.py,sha256=rtgGj6jAfXxHZ1oihFoOkK4MUtapFpVMdREKzXKLnu0,44113
169
- dtlpy/repositories/dpks.py,sha256=mj3QPvfzj_jZAscwIgpKUfa7fLxptc3OJQ_RrSfgYxo,17487
169
+ dtlpy/repositories/dpks.py,sha256=dglvaiSFBvEithhlQ0RAXwzTxoZaICONs-owx3e2nfU,17848
170
170
  dtlpy/repositories/drivers.py,sha256=fF0UuHCyBzop8pHfryex23mf0kVFAkqzNdOmwBbaWxY,10204
171
171
  dtlpy/repositories/executions.py,sha256=4UoU6bnB3kl5cMuF1eJvDecfZCaB06gKWxPfv6_g1_k,32598
172
172
  dtlpy/repositories/feature_sets.py,sha256=UowMDAl_CRefRB5oZzubnsjU_OFgiPPdQXn8q2j4Kuw,9666
@@ -223,19 +223,19 @@ dtlpy/utilities/reports/report.py,sha256=3nEsNnIWmdPEsd21nN8vMMgaZVcPKn9iawKTTeO
223
223
  dtlpy/utilities/videos/__init__.py,sha256=SV3w51vfPuGBxaMeNemx6qEMHw_C4lLpWNGXMvdsKSY,734
224
224
  dtlpy/utilities/videos/video_player.py,sha256=LCxg0EZ_DeuwcT7U_r7MRC6Q19s0xdFb7x5Gk39PRms,24072
225
225
  dtlpy/utilities/videos/videos.py,sha256=Dj916B4TQRIhI7HZVevl3foFrCsPp0eeWwvGbgX3-_A,21875
226
- dtlpy-1.101.8.data/scripts/dlp,sha256=-F0vSCWuSOOtgERAtsPMPyMmzitjhB7Yeftg_PDlDjw,10
227
- dtlpy-1.101.8.data/scripts/dlp.bat,sha256=QOvx8Dlx5dUbCTMpwbhOcAIXL1IWmgVRSboQqDhIn3A,37
228
- dtlpy-1.101.8.data/scripts/dlp.py,sha256=tEokRaDINISXnq8yNx_CBw1qM5uwjYiZoJOYGqWB3RU,4267
226
+ dtlpy-1.102.14.data/scripts/dlp,sha256=-F0vSCWuSOOtgERAtsPMPyMmzitjhB7Yeftg_PDlDjw,10
227
+ dtlpy-1.102.14.data/scripts/dlp.bat,sha256=QOvx8Dlx5dUbCTMpwbhOcAIXL1IWmgVRSboQqDhIn3A,37
228
+ dtlpy-1.102.14.data/scripts/dlp.py,sha256=tEokRaDINISXnq8yNx_CBw1qM5uwjYiZoJOYGqWB3RU,4267
229
229
  tests/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
230
  tests/assets/models_flow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
231
231
  tests/assets/models_flow/failedmain.py,sha256=n8F4eu_u7JPrJ1zedbJPvv9e3lHb3ihoErqrBIcseEc,1847
232
- tests/assets/models_flow/main.py,sha256=xotAjdHpFnIic3Wb-4f7GSg2igtuXZjvRPiYdCTawhA,2064
232
+ tests/assets/models_flow/main.py,sha256=vnDKyVZaae2RFpvwS22Hzi6Dt2LJerH4yQrmKtaT8_g,2123
233
233
  tests/assets/models_flow/main_model.py,sha256=Hl_tv7Q6KaRL3yLkpUoLMRqu5-ab1QsUYPL6RPEoamw,2042
234
234
  tests/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
235
- tests/features/environment.py,sha256=V23cUx_p4VpNk9kc2I0BDZJHO_xcJBFJq8m3JlYCooc,16736
236
- dtlpy-1.101.8.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
237
- dtlpy-1.101.8.dist-info/METADATA,sha256=EtBmjxKIz7pBOOh-ZOrI_IiLcUhSICMf7oyCNXDKIDI,3019
238
- dtlpy-1.101.8.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
239
- dtlpy-1.101.8.dist-info/entry_points.txt,sha256=C4PyKthCs_no88HU39eioO68oei64STYXC2ooGZTc4Y,43
240
- dtlpy-1.101.8.dist-info/top_level.txt,sha256=ZWuLmQGUOtWAdgTf4Fbx884w1o0vBYq9dEc1zLv9Mig,12
241
- dtlpy-1.101.8.dist-info/RECORD,,
235
+ tests/features/environment.py,sha256=oAO7H7j7Y7czW0t25Gv1KwI2-ofqhZVkbCw9LbZCp4Y,17506
236
+ dtlpy-1.102.14.dist-info/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
237
+ dtlpy-1.102.14.dist-info/METADATA,sha256=8SA6BCGb20bC3aZZwWdE-vrOjyOEEvA7ecIX1aE6fJo,3020
238
+ dtlpy-1.102.14.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
239
+ dtlpy-1.102.14.dist-info/entry_points.txt,sha256=C4PyKthCs_no88HU39eioO68oei64STYXC2ooGZTc4Y,43
240
+ dtlpy-1.102.14.dist-info/top_level.txt,sha256=ZWuLmQGUOtWAdgTf4Fbx884w1o0vBYq9dEc1zLv9Mig,12
241
+ dtlpy-1.102.14.dist-info/RECORD,,
@@ -1,3 +1,5 @@
1
+ import time
2
+
1
3
  import dtlpy as dl
2
4
  import logging
3
5
  import os
@@ -26,10 +28,12 @@ class ModelAdapter(dl.BaseModelAdapter):
26
28
 
27
29
  def train(self, data_path, output_path, **kwargs):
28
30
  logger.info("model training")
31
+ time.sleep(60)
29
32
  print(self.model_entity.id)
30
33
 
31
34
  def predict(self, batch, **kwargs):
32
35
  logger.info("model prediction")
36
+ time.sleep(30)
33
37
  batch_annotations = list()
34
38
 
35
39
  for img in batch:
@@ -13,6 +13,7 @@ from behave.formatter.base import StreamOpener
13
13
  import sys
14
14
 
15
15
  import dtlpy as dl
16
+ import shutil
16
17
 
17
18
  try:
18
19
  # for local import
@@ -276,6 +277,11 @@ def after_tag(context, tag):
276
277
  use_fixture(reset_setenv, context)
277
278
  except Exception:
278
279
  logging.exception('Failed to reset env')
280
+ elif tag == 'restore_json_file':
281
+ try:
282
+ use_fixture(restore_json_file, context)
283
+ except Exception:
284
+ logging.exception('Failed to restore json file')
279
285
  elif tag == 'frozen_dataset':
280
286
  pass
281
287
  elif 'testrail-C' in tag:
@@ -381,7 +387,8 @@ def delete_pipeline(context):
381
387
  while context.to_delete_pipelines_ids:
382
388
  pipeline_id = context.to_delete_pipelines_ids.pop(0)
383
389
  try:
384
- filters = context.dl.Filters(resource=context.dl.FiltersResource.EXECUTION, field='latestStatus.status', values=['created', 'in-progress'], operator='in')
390
+ filters = context.dl.Filters(resource=context.dl.FiltersResource.EXECUTION, field='latestStatus.status',
391
+ values=['created', 'in-progress'], operator='in')
385
392
  filters.add(field='pipeline.id', values=pipeline_id)
386
393
  executions = context.dl.executions.list(filters=filters)
387
394
  for execution in executions.items:
@@ -494,4 +501,15 @@ def models_delete(context):
494
501
  except:
495
502
  all_deleted = False
496
503
  logging.exception('Failed deleting model: {}'.format(model.id))
497
- assert all_deleted
504
+ assert all_deleted
505
+
506
+
507
+ def restore_json_file(context):
508
+ if not hasattr(context, 'backup_path') or not hasattr(context, 'original_path'):
509
+ assert False, 'Please make sure to set the original_path and backup_path in the context'
510
+ # Restore the file from the backup
511
+ if os.path.exists(context.backup_path):
512
+ shutil.copy(context.backup_path, context.original_path)
513
+ os.remove(context.backup_path) # Clean up the backup
514
+ else:
515
+ raise FileNotFoundError(f"Backup file not found for {context.original_path}")
File without changes