Skip to content

Commit 182f8e2

Browse files
ziltozilto
zilto
authored and
zilto
committed
add GraphConstructionHook to __init__.py with other public hooks; updated ExperimentTracker hook accordingly
1 parent 7fff0c7 commit 182f8e2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

hamilton/lifecycle/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from .api import ( # noqa: F401
22
EdgeConnectionHook,
33
GraphAdapter,
4+
GraphConstructionHook,
45
GraphExecutionHook,
56
LegacyResultMixin,
67
NodeExecutionHook,
@@ -25,6 +26,7 @@
2526
"PrintLn",
2627
"PrintLnHook", # for backwards compatibility this will be removed in 2.0
2728
"PDBDebugger",
29+
"GraphConstructionHook",
2830
"GraphExecutionHook",
2931
"NodeExecutionMethod",
3032
"StaticValidator",

hamilton/plugins/h_experiments/hook.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class RunMetadata:
109109
class ExperimentTracker(
110110
lifecycle.NodeExecutionHook,
111111
lifecycle.GraphExecutionHook,
112-
lifecycle.base.BasePostGraphConstruct,
112+
lifecycle.GraphConstructionHook,
113113
):
114114
def __init__(self, experiment_name: str, base_directory: str = "./experiments"):
115115
validate_string_input(experiment_name)
@@ -131,7 +131,7 @@ def __init__(self, experiment_name: str, base_directory: str = "./experiments"):
131131
self.overrides: list[NodeOverride] = list()
132132
self.materializers: list[NodeMaterializer] = list()
133133

134-
def post_graph_construct(self, *, config: dict[str, Any], **kwargs):
134+
def run_after_graph_construction(self, *, config: dict[str, Any], **kwargs):
135135
"""Store the Driver config before creating the graph"""
136136
self.config = config
137137

0 commit comments

Comments
 (0)