Skip to content

Commit

Permalink
fix save model and some docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
safoinme committed Nov 29, 2023
1 parent 0cf04fa commit 66389f3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ The project loosely follows [the recommended ZenML project structure](https://do
│ │ ├── promote_latest.py # promote latest step
│ │ ├── promote_metric_compare_promoter.py # metric compare promoter step
│ │ └── promote_get_metrics.py # get metric step
│ ├── registrer # `zenml.steps.registrer` implementations
│ ├── register # `zenml.steps.register` implementations
│ │ ├── __init__.py
│ │ └── model_log_registrer.py # model log registrer step
│ │ └── model_log_register.py # model log register step
│ ├── tokenization # `zenml.steps.tokenization` implementations
│ │ ├── __init__.py
│ │ └── tokenization.py # tokenization step
Expand Down
2 changes: 1 addition & 1 deletion template/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"--training-pipeline",
is_flag=True,
default=True,
help="Whether to run the pipeline that traines the model to {{target_environment}}.",
help="Whether to run the pipeline that train the model to {{target_environment}}.",
)
@click.option(
"--promoting-pipeline",
Expand Down
2 changes: 1 addition & 1 deletion template/steps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
promote_current,
{%- endif %}
)
from .registrer import register_model
from .register import register_model
from .tokenizer_loader import (
tokenizer_loader,
)
Expand Down
2 changes: 1 addition & 1 deletion template/steps/deploying/save_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def save_model_to_deploy():
f" Loading latest version of the model for stage {pipeline_extra['target_env']}..."
)
# Get latest saved model version in target environment
latest_version = get_step_context().model_version._get_model_version()
latest_version = get_step_context().model_version

# Load model and tokenizer from Model Control Plane
model = latest_version.load_artifact(name="model")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def deploy_locally(

return process.pid

lables = ",".join(labels)
labels = ",".join(labels)
# Construct the path to the app.py file
zenml_repo_root = Client().root
if not zenml_repo_root:
Expand All @@ -69,7 +69,7 @@ def deploy_locally(
)
app_path = str(os.path.join(zenml_repo_root, "gradio", "app.py"))
command = ["python", app_path, "--tokenizer_name_or_path", tokenizer_name_or_path, "--model_name_or_path", model_name_or_path,
"--labels", lables, "--title", title, "--description", description,
"--labels", labels, "--title", title, "--description", description,
"--interpretation", interpretation, "--examples", example]
logger.info(f"Command: {command}")
# Call the function to launch the script
Expand Down
File renamed without changes.

0 comments on commit 66389f3

Please sign in to comment.