Skip to content

Commit

Permalink
Rename model references from gitguarden to secret_detection across co…
Browse files Browse the repository at this point in the history
…nfigurations and pipelines
  • Loading branch information
safoinme committed Nov 28, 2024
1 parent cde7595 commit 17c0c83
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 29 deletions.
2 changes: 1 addition & 1 deletion train_and_deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ classification datasets provided by the scikit-learn library. The project was
generated from the [E2E Batch ZenML project template](https://github.com/zenml-io/template-e2e-batch)
with the following properties:
- Project name: ZenML E2E project
- Technical Name: gitguarden
- Technical Name: secret_detection
- Version: `0.0.1`
- Licensed with apache to ZenML GmbH<>
- Deployment environment: `staging`
Expand Down
2 changes: 1 addition & 1 deletion train_and_deploy/configs/deploy_production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ steps:

# configuration of the Model Control Plane
model:
name: gitguarden
name: secret_detection
version: staging

# pipeline level extra configurations
Expand Down
2 changes: 1 addition & 1 deletion train_and_deploy/configs/deployer_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ steps:

# configuration of the Model Control Plane
model:
name: gitguarden
name: secret_detection
version: staging

# pipeline level extra configurations
Expand Down
2 changes: 1 addition & 1 deletion train_and_deploy/configs/inference_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ steps:

# configuration of the Model Control Plane
model:
name: gitguarden
name: secret_detection
version: staging

# pipeline level extra configurations
Expand Down
8 changes: 4 additions & 4 deletions train_and_deploy/configs/train_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ settings:
steps:
model_trainer:
parameters:
name: gitguarden
name: secret_detection
promote_with_metric_compare:
parameters:
mlflow_model_name: gitguarden
mlflow_model_name: secret_detection
notify_on_success:
parameters:
notify_on_success: False

# configuration of the Model Control Plane
model:
name: gitguarden
name: secret_detection
license: apache
description: gitguarden E2E Batch Use Case
description: secret_detection E2E Batch Use Case
audience: All ZenML users
use_cases: |
The ZenML E2E project project demonstrates how the most important steps of
Expand Down
35 changes: 35 additions & 0 deletions train_and_deploy/gitguarden.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
components:
artifact_store:
configuration:
path: s3://zenml-dev
flavor: s3
name: s3
type: artifact_store
container_registry:
configuration:
uri: 339712793861.dkr.ecr.eu-central-1.amazonaws.com
flavor: aws
name: ecr
type: container_registry
data_validator:
configuration: {}
flavor: evidently
name: evidently_data_validator
type: data_validator
image_builder:
configuration: {}
flavor: local
name: local_builder
type: image_builder
model_deployer:
configuration: {}
flavor: bentoml
name: jayesh_bento
type: model_deployer
orchestrator:
configuration: {}
flavor: local
name: default
type: orchestrator
stack_name: secret_detection
zenml_version: 0.70.0
8 changes: 4 additions & 4 deletions train_and_deploy/pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#


from .batch_inference import gitguarden_batch_inference
from .training import gitguarden_training
from .local_deployment import gitguarden_local_deployment
from .deploy_production import gitguarden_production_deployment
from .batch_inference import secret_detection_batch_inference
from .training import secret_detection_training
from .local_deployment import secret_detection_local_deployment
from .deploy_production import secret_detection_production_deployment
2 changes: 1 addition & 1 deletion train_and_deploy/pipelines/batch_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


@pipeline(on_failure=notify_on_failure)
def gitguarden_batch_inference(
def secret_detection_batch_inference(
target_env: str,
):
"""
Expand Down
2 changes: 1 addition & 1 deletion train_and_deploy/pipelines/deploy_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


@pipeline(on_failure=notify_on_failure, enable_cache=False)
def gitguarden_production_deployment(
def secret_detection_production_deployment(
target_env: str,
):
"""Model deployment pipeline.
Expand Down
2 changes: 1 addition & 1 deletion train_and_deploy/pipelines/local_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


@pipeline(on_failure=notify_on_failure, enable_cache=False)
def gitguarden_local_deployment(
def secret_detection_local_deployment(
target_env: str,
):
"""Model deployment pipeline.
Expand Down
2 changes: 1 addition & 1 deletion train_and_deploy/pipelines/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@


@pipeline(on_failure=notify_on_failure)
def gitguarden_training(
def secret_detection_training(
model_search_space: Dict[str, Any],
target_env: str,
test_size: float = 0.2,
Expand Down
24 changes: 12 additions & 12 deletions train_and_deploy/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

import click
from pipelines import (
gitguarden_batch_inference,
gitguarden_local_deployment,
gitguarden_production_deployment,
gitguarden_training,
secret_detection_batch_inference,
secret_detection_local_deployment,
secret_detection_production_deployment,
secret_detection_training,
)
from zenml.logger import get_logger

Expand Down Expand Up @@ -202,9 +202,9 @@ def main(
"train_config.yaml",
)
pipeline_args["run_name"] = (
f"gitguarden_training_run_{dt.now().strftime('%Y_%m_%d_%H_%M_%S')}"
f"secret_detection_training_run_{dt.now().strftime('%Y_%m_%d_%H_%M_%S')}"
)
gitguarden_training.with_options(**pipeline_args)(**run_args_train)
secret_detection_training.with_options(**pipeline_args)(**run_args_train)
logger.info("Training pipeline finished successfully!")

if deployment:
Expand All @@ -216,9 +216,9 @@ def main(
"deployer_config.yaml",
)
pipeline_args["run_name"] = (
f"gitguarden_local_deployment_run_{dt.now().strftime('%Y_%m_%d_%H_%M_%S')}"
f"secret_detection_local_deployment_run_{dt.now().strftime('%Y_%m_%d_%H_%M_%S')}"
)
gitguarden_local_deployment.with_options(**pipeline_args)(**run_args_inference)
secret_detection_local_deployment.with_options(**pipeline_args)(**run_args_inference)

if inference:
# Execute Batch Inference Pipeline
Expand All @@ -229,9 +229,9 @@ def main(
"inference_config.yaml",
)
pipeline_args["run_name"] = (
f"gitguarden_batch_inference_run_{dt.now().strftime('%Y_%m_%d_%H_%M_%S')}"
f"secret_detection_batch_inference_run_{dt.now().strftime('%Y_%m_%d_%H_%M_%S')}"
)
gitguarden_batch_inference.with_options(**pipeline_args)(
secret_detection_batch_inference.with_options(**pipeline_args)(
**run_args_inference
)
if production:
Expand All @@ -243,9 +243,9 @@ def main(
"deploy_production.yaml",
)
pipeline_args["run_name"] = (
f"gitguarden_production_run_{dt.now().strftime('%Y_%m_%d_%H_%M_%S')}"
f"secret_detection_production_run_{dt.now().strftime('%Y_%m_%d_%H_%M_%S')}"
)
gitguarden_production_deployment.with_options(**pipeline_args)(
secret_detection_production_deployment.with_options(**pipeline_args)(
**run_args_production
)

Expand Down
2 changes: 1 addition & 1 deletion train_and_deploy/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GitGuarden:
"""

# Load in the class scope to declare the model as a dependency of the service
iris_model = bentoml.models.get("gitguarden:latest")
iris_model = bentoml.models.get("secret_detection:latest")

def __init__(self):
"""
Expand Down

0 comments on commit 17c0c83

Please sign in to comment.