zenml-nightly 0.84.1.dev20250801__py3-none-any.whl → 0.84.1.dev20250802__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/wandb/flavors/wandb_experiment_tracker_flavor.py +10 -8
- zenml/logging/step_logging.py +2 -2
- zenml/materializers/path_materializer.py +27 -3
- {zenml_nightly-0.84.1.dev20250801.dist-info → zenml_nightly-0.84.1.dev20250802.dist-info}/METADATA +1 -1
- {zenml_nightly-0.84.1.dev20250801.dist-info → zenml_nightly-0.84.1.dev20250802.dist-info}/RECORD +9 -9
- {zenml_nightly-0.84.1.dev20250801.dist-info → zenml_nightly-0.84.1.dev20250802.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.84.1.dev20250801.dist-info → zenml_nightly-0.84.1.dev20250802.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.84.1.dev20250801.dist-info → zenml_nightly-0.84.1.dev20250802.dist-info}/entry_points.txt +0 -0
zenml/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.84.1.
|
1
|
+
0.84.1.dev20250802
|
@@ -43,20 +43,19 @@ class WandbExperimentTrackerSettings(BaseSettings):
|
|
43
43
|
"""Settings for the Wandb experiment tracker."""
|
44
44
|
|
45
45
|
run_name: Optional[str] = Field(
|
46
|
-
None,
|
47
|
-
description="The Wandb run name to use for tracking experiments."
|
46
|
+
None, description="The Wandb run name to use for tracking experiments."
|
48
47
|
)
|
49
48
|
tags: List[str] = Field(
|
50
49
|
default_factory=list,
|
51
|
-
description="Tags to attach to the Wandb run for categorization and filtering."
|
50
|
+
description="Tags to attach to the Wandb run for categorization and filtering.",
|
52
51
|
)
|
53
52
|
settings: Dict[str, Any] = Field(
|
54
53
|
default_factory=dict,
|
55
|
-
description="Additional settings for the Wandb run configuration."
|
54
|
+
description="Additional settings for the Wandb run configuration.",
|
56
55
|
)
|
57
56
|
enable_weave: bool = Field(
|
58
57
|
False,
|
59
|
-
description="Whether to enable Weave integration for enhanced experiment tracking."
|
58
|
+
description="Whether to enable Weave integration for enhanced experiment tracking.",
|
60
59
|
)
|
61
60
|
|
62
61
|
@field_validator("settings", mode="before")
|
@@ -73,7 +72,10 @@ class WandbExperimentTrackerSettings(BaseSettings):
|
|
73
72
|
Returns:
|
74
73
|
Dict representation of the settings.
|
75
74
|
"""
|
76
|
-
|
75
|
+
try:
|
76
|
+
import wandb
|
77
|
+
except ImportError:
|
78
|
+
return value
|
77
79
|
|
78
80
|
if isinstance(value, wandb.Settings):
|
79
81
|
# Depending on the wandb version, either `model_dump`,
|
@@ -103,12 +105,12 @@ class WandbExperimentTrackerConfig(
|
|
103
105
|
entity: Optional[str] = Field(
|
104
106
|
None,
|
105
107
|
description="Name of an existing Wandb entity (team or user account) "
|
106
|
-
"to log experiments to."
|
108
|
+
"to log experiments to.",
|
107
109
|
)
|
108
110
|
project_name: Optional[str] = Field(
|
109
111
|
None,
|
110
112
|
description="Name of an existing Wandb project to log experiments to. "
|
111
|
-
"If not specified, a default project will be used."
|
113
|
+
"If not specified, a default project will be used.",
|
112
114
|
)
|
113
115
|
|
114
116
|
|
zenml/logging/step_logging.py
CHANGED
@@ -335,11 +335,11 @@ class PipelineLogsStorage:
|
|
335
335
|
except Exception as e:
|
336
336
|
logger.error("Error in log storage thread: %s", e)
|
337
337
|
finally:
|
338
|
-
# Always mark all queue tasks as done
|
339
338
|
for _ in messages:
|
340
339
|
self.log_queue.task_done()
|
341
340
|
|
342
|
-
|
341
|
+
# Wait for the next write interval or until shutdown is requested
|
342
|
+
self.shutdown_event.wait(timeout=self.write_interval)
|
343
343
|
|
344
344
|
def _log_storage_worker(self) -> None:
|
345
345
|
"""Log storage thread worker that processes the log queue."""
|
@@ -29,6 +29,30 @@ from zenml.materializers.base_materializer import BaseMaterializer
|
|
29
29
|
from zenml.utils.io_utils import is_path_within_directory
|
30
30
|
|
31
31
|
|
32
|
+
def _is_safe_tar_member(member: tarfile.TarInfo, directory: str) -> bool:
|
33
|
+
"""Check if a tar member is safe to extract.
|
34
|
+
|
35
|
+
This function validates that the member name and any link targets
|
36
|
+
are within the specified directory to prevent path traversal attacks.
|
37
|
+
|
38
|
+
Args:
|
39
|
+
member: The tar member to validate.
|
40
|
+
directory: The target extraction directory.
|
41
|
+
|
42
|
+
Returns:
|
43
|
+
True if the member is safe to extract, False otherwise.
|
44
|
+
"""
|
45
|
+
# Check if the member name is within the directory
|
46
|
+
if not is_path_within_directory(member.name, directory):
|
47
|
+
return False
|
48
|
+
|
49
|
+
# For symbolic links and hard links, validate the target path
|
50
|
+
if member.issym() or member.islnk():
|
51
|
+
return is_path_within_directory(member.linkname, directory)
|
52
|
+
|
53
|
+
return True
|
54
|
+
|
55
|
+
|
32
56
|
class PathMaterializer(BaseMaterializer):
|
33
57
|
"""Materializer for Path objects.
|
34
58
|
|
@@ -73,14 +97,14 @@ class PathMaterializer(BaseMaterializer):
|
|
73
97
|
# Extract the archive to the temporary directory
|
74
98
|
with tarfile.open(archive_path_local, "r:gz") as tar:
|
75
99
|
# Validate archive members to prevent path traversal attacks
|
76
|
-
# Filter members to only those with safe paths
|
100
|
+
# Filter members to only those with safe paths and link targets
|
77
101
|
safe_members = []
|
78
102
|
for member in tar.getmembers():
|
79
|
-
if
|
103
|
+
if _is_safe_tar_member(member, directory):
|
80
104
|
safe_members.append(member)
|
81
105
|
|
82
106
|
# Extract only safe members
|
83
|
-
tar.extractall(path=directory, members=safe_members) # nosec B202 - members are filtered through
|
107
|
+
tar.extractall(path=directory, members=safe_members) # nosec B202 - members are filtered through _is_safe_tar_member
|
84
108
|
|
85
109
|
# Clean up the archive file
|
86
110
|
os.remove(archive_path_local)
|
{zenml_nightly-0.84.1.dev20250801.dist-info → zenml_nightly-0.84.1.dev20250802.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=myLpU8v50Vgzy97KA02rMlaQZilIphIXQaCoYw3pEQ4,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
|
@@ -554,7 +554,7 @@ zenml/integrations/wandb/__init__.py,sha256=5aTIc27MeYzODDGeJHZmtRhTSNkg7Vt2tHgr
|
|
554
554
|
zenml/integrations/wandb/experiment_trackers/__init__.py,sha256=8nFyyvh-PTF5d9ZfjS7xFSWTWSpreRB1azePv-Ex2sc,771
|
555
555
|
zenml/integrations/wandb/experiment_trackers/wandb_experiment_tracker.py,sha256=GV5zDPgj6Dh3ho2MMUC1Da1ezPrNtr4RE9tisWGde00,5749
|
556
556
|
zenml/integrations/wandb/flavors/__init__.py,sha256=b4oJHyCdMN98XB-8S-Pnv39HA-oXQWpup6eZmCmIAEY,894
|
557
|
-
zenml/integrations/wandb/flavors/wandb_experiment_tracker_flavor.py,sha256=
|
557
|
+
zenml/integrations/wandb/flavors/wandb_experiment_tracker_flavor.py,sha256=Y-_YVWEOvKyQzCRXVxtdRNqHJukeMZf6qxsWaweekMY,5408
|
558
558
|
zenml/integrations/whylogs/__init__.py,sha256=PROjw-4-SDSpzxfoqxKud8vGnJm-HsrWxMumjGQuF3M,2423
|
559
559
|
zenml/integrations/whylogs/constants.py,sha256=Txs7qQjmj4vuoqC6rJvoBJ-4yv41CrapExG0_5TvEpw,752
|
560
560
|
zenml/integrations/whylogs/data_validators/__init__.py,sha256=cLblrK_3Hckc_p8YjqJir28V9Nx_-pFPEIknjodQNQQ,820
|
@@ -578,7 +578,7 @@ zenml/io/filesystem_registry.py,sha256=stujDg4a5k983WMwp3rj4Z4puiUco4REyVoIoMIpI
|
|
578
578
|
zenml/io/local_filesystem.py,sha256=xQTZPT5cpooptUV8KiifxZojS6pWCv1-6UUxitUYb_E,7386
|
579
579
|
zenml/logger.py,sha256=STfebaOdCGmw404gwKhwpDrrhtKDUREeerO7UtapzfE,6997
|
580
580
|
zenml/logging/__init__.py,sha256=knhroJ2h0uHBCGzAiBBGJEiuhEA3cwI6XYBRIyXdbkQ,613
|
581
|
-
zenml/logging/step_logging.py,sha256=
|
581
|
+
zenml/logging/step_logging.py,sha256=PTAHlqNfWF-Ly0zvBxroQ3S9vOMEhjSZTzi0cmZVKqQ,27767
|
582
582
|
zenml/login/__init__.py,sha256=Evi7hq8tpUn57IM3iX3hYP0r8oIeEWUhS471TAOyVGs,644
|
583
583
|
zenml/login/credentials.py,sha256=RtLmYkFQ5trbprhsO8NCRKwBA136KzGoUWY52dZP9GA,12722
|
584
584
|
zenml/login/credentials_store.py,sha256=k55mNSqc_RaBuvLWtg5ubQAwlSbaTxTVAqoZ1OQ2YcM,24750
|
@@ -602,7 +602,7 @@ zenml/materializers/cloudpickle_materializer.py,sha256=PIZauXg1SBYmBUi9FBd2t3LFy
|
|
602
602
|
zenml/materializers/materializer_registry.py,sha256=ic-aWhJ2Ex9F_rml2dDVAxhRfW3nd71QMxzfTPP6BIM,4002
|
603
603
|
zenml/materializers/numpy_materializer.py,sha256=OLcHF9Z0tAqQ_U8TraA0vGmZjHoT7eT_XevncIutt0M,1715
|
604
604
|
zenml/materializers/pandas_materializer.py,sha256=c4B-ly04504gysA66iCYcmEdeh0ClePRTxRCkmHqIgE,1725
|
605
|
-
zenml/materializers/path_materializer.py,sha256=
|
605
|
+
zenml/materializers/path_materializer.py,sha256=ydfKHhi14acjSb9jqizsXRRO4wKaCsSNUJg2woPw9XY,6217
|
606
606
|
zenml/materializers/pydantic_materializer.py,sha256=eDp3eOR-X7FOHlpwALOJtVUtJti75Dsa7r0lzSjeQ-Q,2271
|
607
607
|
zenml/materializers/service_materializer.py,sha256=OV5HFUuIc8UF8vE5y_FTWn4_mpCz0AtJPnNA2YFAjZE,2992
|
608
608
|
zenml/materializers/structured_string_materializer.py,sha256=8LIvSH3JQn_QRAWGXK5_NhPQ4NgCt5zzz6f8GnGG9q4,4442
|
@@ -1352,8 +1352,8 @@ zenml/zen_stores/secrets_stores/sql_secrets_store.py,sha256=LPFW757WCJLP1S8vrvjs
|
|
1352
1352
|
zenml/zen_stores/sql_zen_store.py,sha256=YTd_YNqPvnlc6pnIO9zQpUZH9sAGH-r0Qr635u-7Ays,491254
|
1353
1353
|
zenml/zen_stores/template_utils.py,sha256=iCXrXpqzVTY7roqop4Eh9J7DmLW6PQeILZexmw_l3b8,10074
|
1354
1354
|
zenml/zen_stores/zen_store_interface.py,sha256=weiSULdI9AsbCE10a5TcwtybX-BJs9hKhjPJnTapWv4,93023
|
1355
|
-
zenml_nightly-0.84.1.
|
1356
|
-
zenml_nightly-0.84.1.
|
1357
|
-
zenml_nightly-0.84.1.
|
1358
|
-
zenml_nightly-0.84.1.
|
1359
|
-
zenml_nightly-0.84.1.
|
1355
|
+
zenml_nightly-0.84.1.dev20250802.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
|
1356
|
+
zenml_nightly-0.84.1.dev20250802.dist-info/METADATA,sha256=6uK60EoPuvOWhVBa2L-1H0aj4GF5ls3OP1Sc-Q6F8Yc,24296
|
1357
|
+
zenml_nightly-0.84.1.dev20250802.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
1358
|
+
zenml_nightly-0.84.1.dev20250802.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
|
1359
|
+
zenml_nightly-0.84.1.dev20250802.dist-info/RECORD,,
|
{zenml_nightly-0.84.1.dev20250801.dist-info → zenml_nightly-0.84.1.dev20250802.dist-info}/LICENSE
RENAMED
File without changes
|
{zenml_nightly-0.84.1.dev20250801.dist-info → zenml_nightly-0.84.1.dev20250802.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|