Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some deprecated features #2926

Merged
merged 22 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/zenml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
from zenml.artifacts.external_artifact import ExternalArtifact
from zenml.model.model import Model
from zenml.model.model_version import ModelVersion # TODO: deprecate me
from zenml.new.pipelines.pipeline_context import get_pipeline_context
from zenml.new.pipelines.pipeline_decorator import pipeline
from zenml.new.steps.step_decorator import step
from zenml.new.steps.step_context import get_step_context
from zenml.pipelines import get_pipeline_context
from zenml.pipelines import pipeline
from zenml.steps import step
from zenml.steps.step_context import get_step_context
from zenml.steps.utils import log_step_metadata
from zenml.entrypoints import entrypoint

Expand Down
2 changes: 1 addition & 1 deletion src/zenml/artifacts/artifact_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from zenml.exceptions import StepContextError
from zenml.logger import get_logger
from zenml.metadata.metadata_types import MetadataType
from zenml.new.steps.step_context import get_step_context
from zenml.steps.step_context import get_step_context

if TYPE_CHECKING:
from zenml.model.model import Model
Expand Down
2 changes: 1 addition & 1 deletion src/zenml/artifacts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
StepRunResponse,
StepRunUpdate,
)
from zenml.new.steps.step_context import get_step_context
from zenml.stack import StackComponent
from zenml.steps.step_context import get_step_context
from zenml.utils import source_utils
from zenml.utils.yaml_utils import read_yaml, write_yaml

Expand Down
2 changes: 1 addition & 1 deletion src/zenml/cli/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
PipelineRunFilter,
ScheduleFilter,
)
from zenml.new.pipelines.pipeline import Pipeline
from zenml.pipelines.pipeline_definition import Pipeline
from zenml.utils import source_utils, uuid_utils
from zenml.utils.yaml_utils import write_yaml

Expand Down
2 changes: 1 addition & 1 deletion src/zenml/cli/stack_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ def deploy_stack_component_command(

stack_name: str = cli_params["stack_name"] # type: ignore[assignment]
cli_utils.declare(
f"Importing {component_type.value} component '{name}' into ZenML..."
f"Importing {component_type.value} component '{name}' into ZenML.."
)
import_new_mlstacks_component(
stack_name=stack_name,
Expand Down
2 changes: 1 addition & 1 deletion src/zenml/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2494,7 +2494,7 @@ def trigger_pipeline(
Returns:
Model of the pipeline run.
"""
from zenml.new.pipelines.run_utils import (
from zenml.pipelines.run_utils import (
validate_run_config_is_runnable_from_server,
validate_stack_is_runnable_from_server,
wait_for_pipeline_run_to_finish,
Expand Down
17 changes: 6 additions & 11 deletions src/zenml/config/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
from zenml.environment import get_run_environment_dict
from zenml.exceptions import StackValidationError
from zenml.models import PipelineDeploymentBase
from zenml.new.pipelines.run_utils import get_default_run_name
from zenml.pipelines.run_utils import get_default_run_name
from zenml.utils import pydantic_utils, settings_utils

if TYPE_CHECKING:
from zenml.config.source import Source
from zenml.new.pipelines.pipeline import Pipeline
from zenml.pipelines.pipeline_definition import Pipeline
from zenml.stack import Stack, StackComponent
from zenml.steps.step_invocation import StepInvocation

Expand Down Expand Up @@ -583,8 +583,6 @@ def _compute_pipeline_spec(
Raises:
ValueError: If the pipeline has no steps.
"""
from zenml.pipelines import BasePipeline

if not step_specs:
raise ValueError(
f"Pipeline '{pipeline.name}' cannot be compiled because it has "
Expand All @@ -594,13 +592,10 @@ def _compute_pipeline_spec(
"https://docs.zenml.io/user-guide/starter-guide."
)

additional_spec_args: Dict[str, Any] = {}
if isinstance(pipeline, BasePipeline):
# use older spec version for legacy pipelines
additional_spec_args["version"] = "0.3"
else:
additional_spec_args["source"] = pipeline.resolve()
additional_spec_args["parameters"] = pipeline._parameters
additional_spec_args: Dict[str, Any] = {
"source": pipeline.resolve(),
"parameters": pipeline._parameters,
}

return PipelineSpec(steps=step_specs, **additional_spec_args)

Expand Down
Loading
Loading