Skip to content

Commit 45594de

Browse files
committed
✨ feat: add support forfoptional dependency pre-configuration in template
1 parent 7e36ecb commit 45594de

5 files changed

Lines changed: 528 additions & 3 deletions

File tree

copier.yaml

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,230 @@ gpus:
206206
when: "{{ dockerfile }}"
207207
help: Do you need GPU capabilities for you containers?
208208
default: false
209+
210+
preconfig_dependencies:
211+
type: bool
212+
default: False
213+
help: Do you want to preconfigure some dependencies?
214+
215+
dependencies_categories:
216+
type: str
217+
when: "{{ preconfig_dependencies }}"
218+
multiselect: true
219+
choices:
220+
Core Data & Big Data: core_data
221+
Machine Learning & Hyperparameter Optimization: ml
222+
Deep Learning - PyTorch Ecosystem: dl_pytorch
223+
Deep Learning - Transformers: dl_transformers
224+
# Deep Learning - Extras: dl_extras
225+
Reinforcement Learning & Simulation: rl
226+
MLOps & Production: mlops
227+
Visualization & Dashboards: data_viz
228+
LLM Apps & LangChain Toolkit: langchain
229+
Backend & APIs: backend
230+
Dev, Testing & Profiling: dev
231+
default: []
232+
233+
core_data_deps:
234+
type: str
235+
when: "{{ 'core_data' in dependencies_categories }}"
236+
help: Core Data & Big Data
237+
multiselect: true
238+
choices:
239+
- numpy
240+
- pandas
241+
- polars
242+
- scipy
243+
- statsmodels
244+
- numba
245+
- pyspark
246+
- dask
247+
default: []
248+
249+
machine_learning_deps:
250+
type: str
251+
when: "{{ 'ml' in dependencies_categories }}"
252+
help: Machine Learning & Hyperparameter Optimization
253+
multiselect: true
254+
choices:
255+
- scikit-learn
256+
- scikit-learn-intelex
257+
- xgboost
258+
- joblib
259+
- scikit-optimize
260+
- shap
261+
- optuna
262+
- ray[tune]
263+
default: []
264+
265+
dl_pytorch_deps:
266+
type: str
267+
when: "{{ 'dl_pytorch' in dependencies_categories }}"
268+
help: Deep Learning - PyTorch Ecosystem
269+
multiselect: true
270+
choices:
271+
PyTorch (CPU): pytorch_cpu
272+
PyTorch (CUDA 11.8): pytorch_cu118
273+
PyTorch (CUDA 12.1): pytorch_cu121
274+
PyTorch (CUDA 12.4): pytorch_cu124
275+
torchvision: torchvision
276+
torchaudio: torchaudio
277+
tensorboard: tensorboard
278+
Lightning (PyTorch Lightning): lightning
279+
torchmetrics: torchmetrics
280+
validator: >-
281+
{% if 'pytorch_cpu' in dl_pytorch_deps and ('pytorch_cu124' in dl_pytorch_deps or 'pytorch_cu118' in dl_pytorch_deps) %}
282+
You must choose either a CPU or a GPU backend, not both
283+
{% elif 'pytorch_cu118' in dl_pytorch_deps and 'pytorch_cu124' in dl_pytorch_deps %}
284+
You must choose one version of CUDA not both
285+
{% endif %}
286+
default: []
287+
288+
transformers_deps:
289+
type: str
290+
when: "{{ 'dl_transformers' in dependencies_categories }}"
291+
help: Deep Learning - Transformers
292+
multiselect: true
293+
choices:
294+
- transformers
295+
- datasets
296+
- accelerate
297+
- bitsandbytes
298+
- peft
299+
- evaluate
300+
- timm
301+
default: [transformers]
302+
303+
rl_deps:
304+
type: str
305+
when: "{{ 'rl' in dependencies_categories }}"
306+
help: Reinforcement Learning & Simulation
307+
multiselect: true
308+
choices:
309+
- gymnasium
310+
- stable-baselines3
311+
- ray[rllib]
312+
- pygame
313+
- pygame-ce
314+
validator: >-
315+
{% if 'pygame' in rl_deps and 'pygame-ce' in rl_deps %}
316+
You must choose either pygame or pygame-ce not both
317+
{% endif %}
318+
default: []
319+
320+
mlops_deps:
321+
type: str
322+
when: "{{ 'mlops' in dependencies_categories }}"
323+
help: MLOps
324+
multiselect: true
325+
choices:
326+
- mlflow
327+
- weights-and-biases
328+
- dvc
329+
- prefect
330+
- ray
331+
# - feast
332+
default: []
333+
334+
dvc_extras:
335+
type: str
336+
when: "{{ 'dvc' in mlops_deps }}"
337+
help: "Select optional dependencies for dvc depending on your remote storage:"
338+
multiselect: true
339+
choices:
340+
- s3
341+
- gdrive
342+
- gs
343+
- azure
344+
- ssh
345+
- hdfs
346+
- webdav
347+
- oss
348+
default: []
349+
350+
ray_extras:
351+
type: str
352+
when: "{{ 'ray' in mlops_deps }}"
353+
help: "Select optional dependencies for ray:"
354+
multiselect: true
355+
choices:
356+
- default
357+
- data
358+
- train
359+
- tune
360+
- serve
361+
default: []
362+
363+
data_viz_deps:
364+
type: str
365+
when: "{{ 'data_viz' in dependencies_categories }}"
366+
help: Visualization & Dashboards
367+
multiselect: true
368+
choices:
369+
- matplotlib
370+
- seaborn
371+
- plotly
372+
- streamlit
373+
default: []
374+
375+
langchain_deps:
376+
type: str
377+
when: "{{ 'langchain' in dependencies_categories }}"
378+
help: LLM Apps & LangChain Toolkit
379+
multiselect: true
380+
choices:
381+
- langgraph
382+
- langgraph-checkpoint-sqlite
383+
- langgraph-checkpoint-postgres
384+
- langchain
385+
- langchain-openai
386+
- langchain-community
387+
- langchain-ollama
388+
- langchain-anthropic
389+
- langchain-pinecone
390+
- unstructured
391+
- pypdf
392+
- wikipedia
393+
- firecrawl-py
394+
- aiostream
395+
- faiss-cpu
396+
default: [langchain]
397+
398+
backend_deps:
399+
type: str
400+
when: "{{ 'backend' in dependencies_categories }}"
401+
help: Backend & APIs
402+
multiselect: true
403+
choices:
404+
- fastapi[standard]
405+
- slowapi
406+
- gunicorn
407+
- flask
408+
- pydantic
409+
- pydantic-settings
410+
- python-dotenv
411+
- requests
412+
- httpx
413+
- aiohttp
414+
- sqlmodel
415+
- slqalchemy
416+
- psycopg2-binary
417+
- alembic
418+
- quixstreams
419+
# - redis
420+
# - aioredis
421+
default: []
422+
423+
dev_deps:
424+
type: str
425+
when: "{{ 'dev' in dependencies_categories }}"
426+
help: Dev, Testing & Profiling
427+
multiselect: true
428+
choices:
429+
- pytest-asyncio
430+
- responses
431+
- aioresponses
432+
- types-requests
433+
- pyinstrument
434+
- jupyterlab
435+
default: []

0 commit comments

Comments
 (0)