-
Notifications
You must be signed in to change notification settings - Fork 0
/
copier.yml
173 lines (169 loc) · 5.14 KB
/
copier.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# Copyright (c) ZenML GmbH 2023. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing
# permissions and limitations under the License.
# GLOBAL PROMPT --------------------------------
project_name:
type: str
help: Short name for your project
default: ZenML NLP project
version:
type: str
help: |
Version of your project
default: "0.0.1"
open_source_license:
type: str
help: >-
The license under which your project will be released
choices:
Apache Software License 2.0: apache
MIT license: mit
BSD license: bsd
ISC license: isc
GNU General Public License v3: gpl3
Not open source: none
default: apache
full_name:
type: str
help: >-
The name of the person/entity holding the copyright
default: ZenML GmbH
when: "{{ open_source_license != 'none' }}"
email:
type: str
help: >-
The email of the person/entity holding the copyright
default: info@zenml.io
when: "{{ open_source_license != 'none' }}"
product_name:
type: str
help: The technical name of the data product you are building. Make sure it's one word and all lowercase (e.g. nlp_use_case)
default: nlp_use_case
target_environment:
type: str
help: "The target environment for your project"
choices:
- production
- staging
default: staging
accelerator:
type: str
help: "The accelerator to use for training"
choices:
- gpu
- cpu
default: cpu
sample_rate:
type: bool
help: "Whether to use a sample of the dataset for quick iteration"
default: False
deploy_locally:
type: bool
help: "Whether to deploy locally"
default: True
deploy_to_huggingface:
type: bool
help: "Whether to deploy to HuggingFace Hub"
default: True
deploy_to_skypilot:
type: bool
help: "Whether to deploy to SkyPilot"
default: True
dataset:
type: str
help: "The name of the dataset to use from HuggingFace Datasets"
choices:
- financial_news
- airline_reviews
- imbd_reviews
default: airline_reviews
model:
type: str
help: "The name of the model to use from HuggingFace Models"
choices:
- bert-base-uncased
- roberta-base
- distilbert-base-uncased
default: distilbert-base-uncased
cloud_of_choice:
type: str
help: "Whether to use AWS cloud provider or GCP"
choices:
- aws
- gcp
default: aws
metric_compare_promotion:
type: bool
help: "Whether to promote model versions based on metrics. Otherwise, latest trained model will get promoted."
default: True
notify_on_failures:
type: bool
help: "Whether to notify on pipeline failures?"
default: True
notify_on_successes:
type: bool
help: "Whether to notify on pipeline successes?"
default: False
zenml_server_url:
type: str
help: "The URL of the ZenML server [Optional]"
default: ""
# CONFIGURATION -------------------------
_templates_suffix: ""
_subdirectory: template
_exclude:
- license
- license_header
_tasks:
# Remove unused imports and variables
- >-
{% if _copier_conf.os == 'windows' %}
echo "Auto-formatting not supported on Windows"
{% else %}
{{ _copier_python }} -m ruff check --select F401,F841 --fix \
--exclude "__init__.py" --isolated \
steps pipelines run.py > /dev/null 2>&1 || true
{% endif %}
# Sort imports
- >-
{% if _copier_conf.os == 'windows' %}
echo "Auto-formatting not supported on Windows"
{% else %}
{{ _copier_python }} -m ruff check --select I \
--fix --ignore D \
steps pipelines run.py > /dev/null 2>&1 || true
{% endif %}
# Auto-format code
- >-
{% if _copier_conf.os == 'windows' %}
echo "Auto-formatting not supported on Windows"
{% else %}
{{ _copier_python }} -m black \
--exclude '' --include '\.pyi?$' -l 79 \
steps pipelines run.py > /dev/null 2>&1 || true
{% endif %}
- |
echo "Congratulations, your project has been generated in the '{{ _copier_conf.dst_path }}' directory."
echo "You can now run the following commands to get started:"
echo " cd {{ _copier_conf.dst_path }}"
echo " make setup"
echo " # optional, provision default local stack"
echo " make install-local-stack"
echo " # optional, start ZenML Dashboard"
echo " zenml login --local"
echo " python run.py"
echo
echo "Next, you should take a look at the '{{ _copier_conf.dst_path }}/README.md' file in the generated project."
echo "Happy coding!"
_jinja_extensions:
- jinja2_time.TimeExtension