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

YAML based config #14

Merged
merged 19 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Describe changes
I implemented/fixed _ to achieve _.

## Pre-requisites
Please ensure you have done the following:
- [ ] If my change requires a change to docs, I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] I have updated `ref-zenml` in `.github/workflows/ci.yml` accordingly (if you don't know - `main` would be a solid choice)

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Other (add details above)

1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
run-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
stack-name: [local]
os: [windows-latest, ubuntu-latest, macos-latest]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ df_inference, target = data_loader(is_inference=True)
df_inference = inference_data_preprocessor(
dataset_inf=df_inference,
preprocess_pipeline=ExternalArtifact(
pipeline_name=MetaConfig.pipeline_name_training,
pipeline_name="your_product_name_training",
artifact_name="preprocess_pipeline",
),
target=target,
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
copier
jinja2-time
zenml[templates]
1 change: 0 additions & 1 deletion template/artifacts/__init__.py

This file was deleted.

89 changes: 0 additions & 89 deletions template/artifacts/materializer.py

This file was deleted.

62 changes: 0 additions & 62 deletions template/artifacts/model_metadata.py

This file was deleted.

87 changes: 0 additions & 87 deletions template/config.py

This file was deleted.

78 changes: 78 additions & 0 deletions template/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# {% include 'template/license_header' %}

settings:
docker:
requirements:
- aws
{%- if data_quality_checks %}
- evidently
{%- endif %}
- kubeflow
- kubernetes
- mlflow
- sklearn
- slack
extra:
mlflow_model_name: e2e_use_case_model
{%- if target_environment == 'production' %}
target_env: Production
{%- else %}
target_env: Staging
{%- endif %}
notify_on_success: False
notify_on_failure: True
{%- if hyperparameters_tuning %}
# This set contains all the models that you want to evaluate
# during hyperparameter tuning stage.
model_search_space:
random_forest:
model_package: sklearn.ensemble
model_class: RandomForestClassifier
search_grid:
criterion:
- gini
- entropy
max_depth:
- 2
- 4
- 6
- 8
- 10
- 12
min_samples_leaf:
range:
start: 1
end: 10
n_estimators:
range:
start: 50
end: 500
step: 25
decision_tree:
model_package: sklearn.tree
model_class: DecisionTreeClassifier
search_grid:
criterion:
- gini
- entropy
max_depth:
- 2
- 4
- 6
- 8
- 10
- 12
min_samples_leaf:
range:
start: 1
end: 10
{%- else %}
# This model configuration will be used for the training stage.
model_configuration:
model_package: sklearn.tree
model_class: DecisionTreeClassifier
params:
criterion: gini
max_depth: 5
min_samples_leaf: 3
{%- endif %}
Loading