Skip to content

Commit

Permalink
YAML based config (#14)
Browse files Browse the repository at this point in the history
* fix ExternalArtifact behavior

* update zenml-ref

* fix ref name

* YAML based template configuration

* update docs

* fix config

* verbose tests output

* verbose tests output

* no fail fast

* verbose tests output

* bump timeouts for mlflow

* try replace

* testing inside python

* restore test flow

* update requirements

* properly skip macos

* revert ref
  • Loading branch information
avishniakov authored Oct 19, 2023
1 parent d4d52f9 commit 80aaa6c
Show file tree
Hide file tree
Showing 22 changed files with 328 additions and 347 deletions.
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

This comment has been minimized.

Copy link
@cameronraysmith

cameronraysmith Oct 22, 2023

@avishniakov I believe this leads to a failed image build because kubeflow is the name of a zenml integration and not the name of a pypi package

ERROR: Could not find a version that satisfies the requirement kubeflow (from versions: none)
ERROR: No matching distribution found for kubeflow
error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1
pod kaniko/kaniko-build-f62c7650 terminated (Error)

I do not believe these requirements are passed through the integration --> pypi package mapping.

This comment has been minimized.

Copy link
@avishniakov

avishniakov Oct 31, 2023

Author Contributor

Thanks for great catch @cameronraysmith , it will be fixed going forward 👍🏼

- 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

0 comments on commit 80aaa6c

Please sign in to comment.