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 1414"""Initialization for ZenML."""
1515
1616import os
17+ from typing import Any
1718
1819ROOT_DIR = os .path .dirname (os .path .abspath (__file__ ))
1920
2627
2728init_logging ()
2829
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 } '" )
2940
3041# Need to import zenml.models before zenml.config to avoid circular imports
3142from zenml .models import * # noqa: F401
5061from zenml .steps .utils import log_step_metadata
5162from zenml .utils .metadata_utils import log_metadata
5263from zenml .utils .tag_utils import Tag , add_tags , remove_tags
53- from zenml . entrypoints import entrypoint
64+
5465
5566__all__ = [
5667 "add_tags" ,
7283 "register_artifact" ,
7384 "show" ,
7485 "step" ,
75- "entrypoint" ,
7686]
You can’t perform that action at this time.
0 commit comments