zenml-nightly 0.84.1.dev20250806__py3-none-any.whl → 0.84.2.dev20250808__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.
- zenml/VERSION +1 -1
- zenml/integrations/huggingface/__init__.py +1 -1
- zenml/integrations/hyperai/__init__.py +1 -1
- zenml/steps/base_step.py +12 -3
- zenml/steps/decorated_step.py +98 -2
- zenml/zen_stores/migrations/versions/0.84.2_release.py +23 -0
- {zenml_nightly-0.84.1.dev20250806.dist-info → zenml_nightly-0.84.2.dev20250808.dist-info}/METADATA +3 -3
- {zenml_nightly-0.84.1.dev20250806.dist-info → zenml_nightly-0.84.2.dev20250808.dist-info}/RECORD +11 -10
- {zenml_nightly-0.84.1.dev20250806.dist-info → zenml_nightly-0.84.2.dev20250808.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.84.1.dev20250806.dist-info → zenml_nightly-0.84.2.dev20250808.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.84.1.dev20250806.dist-info → zenml_nightly-0.84.2.dev20250808.dist-info}/entry_points.txt +0 -0
zenml/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.84.
|
1
|
+
0.84.2.dev20250808
|
zenml/steps/base_step.py
CHANGED
@@ -271,6 +271,15 @@ class BaseStep:
|
|
271
271
|
"""
|
272
272
|
return inspect.getsource(self.source_object)
|
273
273
|
|
274
|
+
@property
|
275
|
+
def source_code_cache_value(self) -> str:
|
276
|
+
"""The source code cache value of this step.
|
277
|
+
|
278
|
+
Returns:
|
279
|
+
The source code cache value of this step.
|
280
|
+
"""
|
281
|
+
return self.source_code
|
282
|
+
|
274
283
|
@property
|
275
284
|
def docstring(self) -> Optional[str]:
|
276
285
|
"""The docstring of this step.
|
@@ -288,9 +297,9 @@ class BaseStep:
|
|
288
297
|
A dictionary containing the caching parameters
|
289
298
|
"""
|
290
299
|
parameters = {
|
291
|
-
CODE_HASH_PARAMETER_NAME:
|
292
|
-
self.
|
293
|
-
)
|
300
|
+
CODE_HASH_PARAMETER_NAME: hashlib.sha256(
|
301
|
+
self.source_code_cache_value.encode("utf-8")
|
302
|
+
).hexdigest()
|
294
303
|
}
|
295
304
|
for name, output in self.configuration.outputs.items():
|
296
305
|
if output.materializer_source:
|
zenml/steps/decorated_step.py
CHANGED
@@ -13,15 +13,111 @@
|
|
13
13
|
# permissions and limitations under the License.
|
14
14
|
"""Internal BaseStep subclass used by the step decorator."""
|
15
15
|
|
16
|
-
from typing import Any
|
16
|
+
from typing import Any, Optional
|
17
17
|
|
18
18
|
from zenml.config.source import Source
|
19
|
-
from zenml.steps import BaseStep
|
19
|
+
from zenml.steps import BaseStep, step
|
20
|
+
|
21
|
+
|
22
|
+
def remove_decorator_from_source_code(
|
23
|
+
source_code: str, decorator_name: str
|
24
|
+
) -> str:
|
25
|
+
"""Remove a decorator from the source code of a function.
|
26
|
+
|
27
|
+
Args:
|
28
|
+
source_code: The source code of the function.
|
29
|
+
decorator_name: The name of the decorator.
|
30
|
+
|
31
|
+
Returns:
|
32
|
+
The source code of the function without the decorator.
|
33
|
+
"""
|
34
|
+
import ast
|
35
|
+
|
36
|
+
# Remove potential indentation from the source code
|
37
|
+
source_code_lines = source_code.split("\n")
|
38
|
+
if source_code_lines:
|
39
|
+
first_line = source_code_lines[0]
|
40
|
+
leading_spaces = len(first_line) - len(first_line.lstrip())
|
41
|
+
source_code_lines = [
|
42
|
+
line[leading_spaces:] if len(line) >= leading_spaces else line
|
43
|
+
for line in source_code_lines
|
44
|
+
]
|
45
|
+
|
46
|
+
module = ast.parse("\n".join(source_code_lines))
|
47
|
+
if not module.body or not isinstance(module.body[0], ast.FunctionDef):
|
48
|
+
return source_code
|
49
|
+
|
50
|
+
function_def = module.body[0]
|
51
|
+
if not function_def.decorator_list:
|
52
|
+
return source_code
|
53
|
+
|
54
|
+
for decorator in function_def.decorator_list:
|
55
|
+
lineno = None
|
56
|
+
end_lineno = None
|
57
|
+
|
58
|
+
if isinstance(decorator, ast.Call) and isinstance(
|
59
|
+
decorator.func, ast.Name
|
60
|
+
):
|
61
|
+
if decorator.func.id == decorator_name:
|
62
|
+
lineno = decorator.lineno
|
63
|
+
end_lineno = decorator.end_lineno
|
64
|
+
elif isinstance(decorator, ast.Name):
|
65
|
+
if decorator.id == decorator_name:
|
66
|
+
lineno = decorator.lineno
|
67
|
+
end_lineno = decorator.end_lineno
|
68
|
+
else:
|
69
|
+
continue
|
70
|
+
|
71
|
+
if lineno is not None and end_lineno is not None:
|
72
|
+
# The line numbers are 1-indexed, so we need to
|
73
|
+
# subtract 1
|
74
|
+
source_code_lines = (
|
75
|
+
source_code_lines[: lineno - 1]
|
76
|
+
+ source_code_lines[end_lineno:]
|
77
|
+
)
|
78
|
+
source_code = "\n".join(source_code_lines)
|
79
|
+
break
|
80
|
+
|
81
|
+
return source_code
|
20
82
|
|
21
83
|
|
22
84
|
class _DecoratedStep(BaseStep):
|
23
85
|
"""Internal BaseStep subclass used by the step decorator."""
|
24
86
|
|
87
|
+
def _get_step_decorator_name(self) -> Optional[str]:
|
88
|
+
"""The name of the step decorator.
|
89
|
+
|
90
|
+
Returns:
|
91
|
+
The name of the step decorator.
|
92
|
+
"""
|
93
|
+
decorator_names = [
|
94
|
+
key
|
95
|
+
for key, value in self.entrypoint.__globals__.items()
|
96
|
+
if value is step
|
97
|
+
]
|
98
|
+
if not decorator_names:
|
99
|
+
return None
|
100
|
+
|
101
|
+
return decorator_names[0]
|
102
|
+
|
103
|
+
@property
|
104
|
+
def source_code_cache_value(self) -> str:
|
105
|
+
"""The source code cache value of this step.
|
106
|
+
|
107
|
+
Returns:
|
108
|
+
The source code cache value of this step.
|
109
|
+
"""
|
110
|
+
try:
|
111
|
+
if decorator_name := self._get_step_decorator_name():
|
112
|
+
return remove_decorator_from_source_code(
|
113
|
+
source_code=self.source_code,
|
114
|
+
decorator_name=decorator_name,
|
115
|
+
)
|
116
|
+
except Exception:
|
117
|
+
pass
|
118
|
+
|
119
|
+
return super().source_code_cache_value
|
120
|
+
|
25
121
|
@property
|
26
122
|
def source_object(self) -> Any:
|
27
123
|
"""The source object of this step.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"""Release [0.84.2].
|
2
|
+
|
3
|
+
Revision ID: 0.84.2
|
4
|
+
Revises: 0.84.1
|
5
|
+
Create Date: 2025-08-06 07:52:42.915891
|
6
|
+
|
7
|
+
"""
|
8
|
+
|
9
|
+
# revision identifiers, used by Alembic.
|
10
|
+
revision = "0.84.2"
|
11
|
+
down_revision = "0.84.1"
|
12
|
+
branch_labels = None
|
13
|
+
depends_on = None
|
14
|
+
|
15
|
+
|
16
|
+
def upgrade() -> None:
|
17
|
+
"""Upgrade database schema and/or data, creating a new revision."""
|
18
|
+
pass
|
19
|
+
|
20
|
+
|
21
|
+
def downgrade() -> None:
|
22
|
+
"""Downgrade database schema and/or data back to the previous revision."""
|
23
|
+
pass
|
{zenml_nightly-0.84.1.dev20250806.dist-info → zenml_nightly-0.84.2.dev20250808.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: zenml-nightly
|
3
|
-
Version: 0.84.
|
3
|
+
Version: 0.84.2.dev20250808
|
4
4
|
Summary: ZenML: Write production-ready ML code.
|
5
5
|
License: Apache-2.0
|
6
6
|
Keywords: machine learning,production,pipeline,mlops,devops
|
@@ -125,7 +125,7 @@ Requires-Dist: types-PyYAML (>=6.0.0,<7.0.0) ; extra == "dev"
|
|
125
125
|
Requires-Dist: types-certifi (>=2021.10.8.0,<2022.0.0.0) ; extra == "dev"
|
126
126
|
Requires-Dist: types-croniter (>=1.0.2,<2.0.0) ; extra == "dev"
|
127
127
|
Requires-Dist: types-futures (>=3.3.1,<4.0.0) ; extra == "dev"
|
128
|
-
Requires-Dist: types-paramiko (>=3.4.0) ; extra == "dev"
|
128
|
+
Requires-Dist: types-paramiko (>=3.4.0,<4.0.0) ; extra == "dev"
|
129
129
|
Requires-Dist: types-passlib (>=1.7.7,<2.0.0) ; extra == "dev"
|
130
130
|
Requires-Dist: types-protobuf (>=3.18.0,<4.0.0) ; extra == "dev"
|
131
131
|
Requires-Dist: types-psutil (>=5.8.13,<6.0.0) ; extra == "dev"
|
@@ -168,7 +168,7 @@ Description-Content-Type: text/markdown
|
|
168
168
|
[pypi-shield]: https://img.shields.io/pypi/pyversions/zenml?color=281158
|
169
169
|
[pypi-url]: https://pypi.org/project/zenml/
|
170
170
|
[pypiversion-shield]: https://img.shields.io/pypi/v/zenml?color=361776
|
171
|
-
[downloads-shield]: https://img.shields.io/
|
171
|
+
[downloads-shield]: https://img.shields.io/pepy/dt/zenml?color=431D93
|
172
172
|
[downloads-url]: https://pypi.org/project/zenml/
|
173
173
|
[contributors-shield]: https://img.shields.io/github/contributors/zenml-io/zenml?color=7A3EF4
|
174
174
|
[contributors-url]: https://github.com/zenml-io/zenml/graphs/contributors
|
{zenml_nightly-0.84.1.dev20250806.dist-info → zenml_nightly-0.84.2.dev20250808.dist-info}/RECORD
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
zenml/README.md,sha256=827dekbOWAs1BpW7VF1a4d7EbwPbjwccX-2zdXBENZo,1777
|
2
|
-
zenml/VERSION,sha256=
|
2
|
+
zenml/VERSION,sha256=BH0oSd6m3Nunr0JQEu5sZIhNu4KwT7PTv5ms8cHaL9M,19
|
3
3
|
zenml/__init__.py,sha256=r7JUg2SVDf_dPhS7iU6vudKusEqK4ics7_jFMZhq0o4,2731
|
4
4
|
zenml/actions/__init__.py,sha256=mrt6wPo73iKRxK754_NqsGyJ3buW7RnVeIGXr1xEw8Y,681
|
5
5
|
zenml/actions/base_action.py,sha256=UcaHev6BTuLDwuswnyaPjdA8AgUqB5xPZ-lRtuvf2FU,25553
|
@@ -297,7 +297,7 @@ zenml/integrations/great_expectations/steps/__init__.py,sha256=OGsp32yJs9GItypFR
|
|
297
297
|
zenml/integrations/great_expectations/steps/ge_profiler.py,sha256=ea6WLF1B8pvkGe-dBaAX3tNV2W8mVhUhk6WQpKgqKEA,2141
|
298
298
|
zenml/integrations/great_expectations/steps/ge_validator.py,sha256=kdFzhkzJtQZGOul8E8BE5_315mYGvMuDINYagPflKVk,2946
|
299
299
|
zenml/integrations/great_expectations/utils.py,sha256=4DXjAfsKUVcp_lSGAPiAsAI-WLNjr_DLMsGJOYGkSjE,3138
|
300
|
-
zenml/integrations/huggingface/__init__.py,sha256=
|
300
|
+
zenml/integrations/huggingface/__init__.py,sha256=BkIpcmQIDFG-2m21GJ5OmRynOVFvE5vL2UEiC9nYrNA,2674
|
301
301
|
zenml/integrations/huggingface/flavors/__init__.py,sha256=NXMxZXrS7fHdZnz1G_Sf83k4zkE84C5UoYJzxXSY-R0,970
|
302
302
|
zenml/integrations/huggingface/flavors/huggingface_model_deployer_flavor.py,sha256=QITTxFrpKu5JNH29A_riAWiC0-gY3qcxGWQf__0aQII,4032
|
303
303
|
zenml/integrations/huggingface/materializers/__init__.py,sha256=HoiSCzfMTxtcvkDBconFm_-pdGZXzXDelkuPtcrJIgA,1267
|
@@ -313,7 +313,7 @@ zenml/integrations/huggingface/services/huggingface_deployment.py,sha256=m-8qKca
|
|
313
313
|
zenml/integrations/huggingface/steps/__init__.py,sha256=tjsmnE9lJcXsE46YGPNWJICHXDUWn34m7jE-os-CFLo,879
|
314
314
|
zenml/integrations/huggingface/steps/accelerate_runner.py,sha256=0fazQcqopAVRCInNePsIEy2Vn4EePioAetWXhewXpFA,6387
|
315
315
|
zenml/integrations/huggingface/steps/huggingface_deployer.py,sha256=Wk1wzYwy-kpA-IJAHzukUpIGRxrhZTuyXNYVriXBqCI,4103
|
316
|
-
zenml/integrations/hyperai/__init__.py,sha256=
|
316
|
+
zenml/integrations/hyperai/__init__.py,sha256=wEi-7px6yKIfcqqswxoWrwdH1P5txMNp6iXsAoizuaU,1670
|
317
317
|
zenml/integrations/hyperai/flavors/__init__.py,sha256=PUGBPmQ7y3H7QU2zAj7Ri0rrUBbOWnM_L59AIVWUYwU,800
|
318
318
|
zenml/integrations/hyperai/flavors/hyperai_orchestrator_flavor.py,sha256=r4w16s4IB72nBKEgvSlJ6TRZ88kyP8mduOUZpQ-njn4,5328
|
319
319
|
zenml/integrations/hyperai/orchestrators/__init__.py,sha256=kSYpMZPEWwNu2vxoOC6PeyQ9RLzsPAgTHxL35K36MiE,784
|
@@ -756,8 +756,8 @@ zenml/step_operators/__init__.py,sha256=tqj7fgnQyZubLjwUu4ITwkA-70KMQz4g37agbfF7
|
|
756
756
|
zenml/step_operators/base_step_operator.py,sha256=ZRnY6lcEHY8xZskrKKdPhgKg2BlEoh2_kb8xCaM2D1g,3522
|
757
757
|
zenml/step_operators/step_operator_entrypoint_configuration.py,sha256=wuQKmEI_ckn1CHHrxWGGdIhQyBFXG01aKC2-2b6Atjo,3690
|
758
758
|
zenml/steps/__init__.py,sha256=KKWFOmCZGLDEikOD2E5YmDA7QHo47uPV37by21WwI0U,1453
|
759
|
-
zenml/steps/base_step.py,sha256=
|
760
|
-
zenml/steps/decorated_step.py,sha256=
|
759
|
+
zenml/steps/base_step.py,sha256=HUNNQe3A5DyzEHm4gAbX_NCC2LiKRDI6nrngURW6WdI,44632
|
760
|
+
zenml/steps/decorated_step.py,sha256=cr4m7qi525fUc_VTkb7J16dKdUSzc4UA5eyHg8vFWQg,4275
|
761
761
|
zenml/steps/entrypoint_function_utils.py,sha256=H0WIkHpR_R0S9gl_tWr0nX-fcBlYnm8OQ1cimvrw-qo,9555
|
762
762
|
zenml/steps/step_context.py,sha256=sFvVVvEyKmWTrucofor8Cuxv-72jbziVaQY-OlOvFAM,15526
|
763
763
|
zenml/steps/step_decorator.py,sha256=0TKxP_oAVRizjN3JhBZ8ShFd3fSBdVPU2ijytTg1h2U,6506
|
@@ -1191,6 +1191,7 @@ zenml/zen_stores/migrations/versions/0.83.0_release.py,sha256=Y3Pe9I_LJvUgTtehyD
|
|
1191
1191
|
zenml/zen_stores/migrations/versions/0.83.1_release.py,sha256=p35ZcMR4k5zsPU6sya0fHLDDjKF-mgwNvpMcxbI7cQo,462
|
1192
1192
|
zenml/zen_stores/migrations/versions/0.84.0_release.py,sha256=Lpg4Xqm-CfchmY3sFyMDrC-J1pAoaSz3gGlPSP4eXJQ,462
|
1193
1193
|
zenml/zen_stores/migrations/versions/0.84.1_release.py,sha256=95TBBvlSduocvY5Hy6yT1QjK8Ml2l5JVcTYVNy33om4,462
|
1194
|
+
zenml/zen_stores/migrations/versions/0.84.2_release.py,sha256=igIzI5EJzwiUurUzgrGAI8jLZd48KL2TWZ3nC-yT388,450
|
1194
1195
|
zenml/zen_stores/migrations/versions/026d4577b6a0_add_code_path.py,sha256=hXLzvQcylNrbCVD6vha52PFkSPNC2klW9kA0vuQX_cE,1091
|
1195
1196
|
zenml/zen_stores/migrations/versions/03742aa7fdd7_add_secrets.py,sha256=gewKqu1AnzvNTjVvK1eaAwP0hVneWDUyDRSLTvRCdpg,1587
|
1196
1197
|
zenml/zen_stores/migrations/versions/0392807467dc_add_build_duration.py,sha256=YlkDBlfBBv45FsrMO11YcdRn4Maqmlg77t8gWJO4DfA,982
|
@@ -1354,8 +1355,8 @@ zenml/zen_stores/secrets_stores/sql_secrets_store.py,sha256=LPFW757WCJLP1S8vrvjs
|
|
1354
1355
|
zenml/zen_stores/sql_zen_store.py,sha256=-3zeByIUjIvsx3564O2gJ463512QkZl04okL3eB-nJs,491568
|
1355
1356
|
zenml/zen_stores/template_utils.py,sha256=iCXrXpqzVTY7roqop4Eh9J7DmLW6PQeILZexmw_l3b8,10074
|
1356
1357
|
zenml/zen_stores/zen_store_interface.py,sha256=weiSULdI9AsbCE10a5TcwtybX-BJs9hKhjPJnTapWv4,93023
|
1357
|
-
zenml_nightly-0.84.
|
1358
|
-
zenml_nightly-0.84.
|
1359
|
-
zenml_nightly-0.84.
|
1360
|
-
zenml_nightly-0.84.
|
1361
|
-
zenml_nightly-0.84.
|
1358
|
+
zenml_nightly-0.84.2.dev20250808.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
|
1359
|
+
zenml_nightly-0.84.2.dev20250808.dist-info/METADATA,sha256=BtymD3zSN6xneRM23MaVs-g30o7X0sNysTxKEDtkea0,24303
|
1360
|
+
zenml_nightly-0.84.2.dev20250808.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
1361
|
+
zenml_nightly-0.84.2.dev20250808.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
|
1362
|
+
zenml_nightly-0.84.2.dev20250808.dist-info/RECORD,,
|
{zenml_nightly-0.84.1.dev20250806.dist-info → zenml_nightly-0.84.2.dev20250808.dist-info}/LICENSE
RENAMED
File without changes
|
{zenml_nightly-0.84.1.dev20250806.dist-info → zenml_nightly-0.84.2.dev20250808.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|