File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 14
14
"""Initialization for ZenML."""
15
15
16
16
import os
17
+ from typing import Any
17
18
18
19
ROOT_DIR = os .path .dirname (os .path .abspath (__file__ ))
19
20
26
27
27
28
init_logging ()
28
29
30
+ def __getattr__ (name : str ) -> Any :
31
+ # We allow directly accessing the entrypoint module as `zenml.entrypoint`
32
+ # as this is needed for some orchestrators. Instead of directly importing
33
+ # the entrypoint module here, we import it dynamically. This avoids a
34
+ # warning when running the `zenml.entrypoints.entrypoint` module directly.
35
+ if name == "entrypoint" :
36
+ from zenml .entrypoints import entrypoint
37
+ return entrypoint
38
+
39
+ raise AttributeError (f"module '{ __name__ } ' has no attribute '{ name } '" )
29
40
30
41
# Need to import zenml.models before zenml.config to avoid circular imports
31
42
from zenml .models import * # noqa: F401
50
61
from zenml .steps .utils import log_step_metadata
51
62
from zenml .utils .metadata_utils import log_metadata
52
63
from zenml .utils .tag_utils import Tag , add_tags , remove_tags
53
- from zenml . entrypoints import entrypoint
64
+
54
65
55
66
__all__ = [
56
67
"add_tags" ,
72
83
"register_artifact" ,
73
84
"show" ,
74
85
"step" ,
75
- "entrypoint" ,
76
86
]
You can’t perform that action at this time.
0 commit comments