You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: LICENSE.txt
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,3 @@
1
-
Copyright 2024 Médéric HURIER (Fmind)
2
-
3
1
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
2
5
3
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Copy file name to clipboardExpand all lines: README.md
+26-25Lines changed: 26 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ The package leverages several [tools](#tools) and [tips](#tips) to make your MLO
13
13
You can use this package as part of your MLOps toolkit or platform (e.g., Model Registry, Experiment Tracking, Realtime Inference, ...).
14
14
15
15
**Related Resources**:
16
+
-**[LLMOps Coding Package (Example)](https://github.com/callmesora/llmops-python-package/)**: Example with best practices and tools to support your LLMOps projects.
16
17
-**[MLOps Coding Course (Learning)](https://github.com/MLOps-Courses/mlops-coding-course)**: Learn how to create, develop, and maintain a state-of-the-art MLOps code base.
17
18
-**[Cookiecutter MLOps Package (Template)](https://github.com/fmind/cookiecutter-mlops-package)**: Start building and deploying Python packages and Docker images for MLOps tasks.
18
19
@@ -69,7 +70,7 @@ You can use this package as part of your MLOps toolkit or platform (e.g., Model
69
70
-[Package](#package)
70
71
-[Evolution: Changelog](#evolution-changelog)
71
72
-[Format: Wheel](#format-wheel)
72
-
-[Manager: Poetry](#manager-poetry)
73
+
-[Manager: uv](#manager-uv)
73
74
-[Runtime: Docker](#runtime-docker)
74
75
-[Programming](#programming)
75
76
-[Language: Python](#language-python)
@@ -119,7 +120,7 @@ This section details the requirements, actions, and next steps to kickstart your
119
120
## Prerequisites
120
121
121
122
-[Python>=3.12](https://www.python.org/downloads/): to benefit from [the latest features and performance improvements](https://docs.python.org/3/whatsnew/3.12.html)
122
-
-[Poetry>=1.8.2](https://python-poetry.org/): to initialize the project [virtual environment](https://docs.python.org/3/library/venv.html) and its dependencies
123
+
-[uv>=0.5.5](https://docs.astral.sh/uv/): to initialize the project [virtual environment](https://docs.python.org/3/library/venv.html) and its dependencies
2.[Run the project installation with poetry](https://python-poetry.org/docs/)
134
+
2.[Run the project installation with uv](https://docs.astral.sh/uv/)
134
135
```bash
135
136
$ cd mlops-python-package/
136
-
$ poetry install
137
+
$ uv sync
137
138
```
138
139
3. Adapt the code base to your desire
139
140
@@ -171,26 +172,26 @@ This config file instructs the program to start a `TrainingJob` with 2 parameter
171
172
172
173
You can find all the parameters of your program in the `src/[package]/jobs/*.py` files.
173
174
174
-
You can also print the full schema supported by this package using `poetry run bikes --schema`.
175
+
You can also print the full schema supported by this package using `uv run bikes --schema`.
175
176
176
177
## Execution
177
178
178
-
The project code can be executed with poetry during your development:
179
+
The project code can be executed with uv during your development:
179
180
180
181
```bash
181
-
$ poetry run [package] confs/tuning.yaml
182
-
$ poetry run [package] confs/training.yaml
183
-
$ poetry run [package] confs/promotion.yaml
184
-
$ poetry run [package] confs/inference.yaml
185
-
$ poetry run [package] confs/evaluations.yaml
186
-
$ poetry run [package] confs/explanations.yaml
182
+
$ uv run [package] confs/tuning.yaml
183
+
$ uv run [package] confs/training.yaml
184
+
$ uv run [package] confs/promotion.yaml
185
+
$ uv run [package] confs/inference.yaml
186
+
$ uv run [package] confs/evaluations.yaml
187
+
$ uv run [package] confs/explanations.yaml
187
188
```
188
189
189
190
In production, you can build, ship, and run the project as a Python package:
190
191
191
192
```bash
192
-
poetry build
193
-
poetry publish # optional
193
+
uv build
194
+
uv publish # optional
194
195
python -m pip install [package]
195
196
[package] confs/inference.yaml
196
197
```
@@ -211,7 +212,7 @@ with job as runner:
211
212
- You can pass several config files in the command-line to merge them from left to right
212
213
- You can define common configurations shared between jobs (e.g., model params)
213
214
- The right job task will be selected automatically thanks to [Pydantic Discriminated Unions](https://docs.pydantic.dev/latest/concepts/unions/#discriminated-unions)
214
-
- This is a great way to run any job supported by the application (training, tuning, ....
215
+
- This is a great way to run any job supported by the application (training, tuning, ...)
215
216
216
217
## Automation
217
218
@@ -233,7 +234,6 @@ $ inv --list
233
234
- **checks.code** - Check the codes with ruff.
234
235
- **checks.coverage** - Check the coverage with coverage.
235
236
- **checks.format** - Check the formats with ruff.
236
-
- **checks.poetry** - Check poetry config files.
237
237
- **checks.security** - Check the security with bandit.
238
238
- **checks.test** - Check the tests with pytest.
239
239
- **checks.type** - Check the types with mypy.
@@ -247,15 +247,15 @@ $ inv --list
247
247
- **cleans.mlruns** - Clean the mlruns folder.
248
248
- **cleans.mypy** - Clean the mypy tool.
249
249
- **cleans.outputs** - Clean the outputs folder.
250
-
- **cleans.poetry** - Clean poetry lock file.
251
-
- **cleans.pytest** - Clean the pytest tool.
252
250
- **cleans.projects** - Run all projects tasks.
251
+
- **cleans.pytest** - Clean the pytest tool.
253
252
- **cleans.python** - Clean python caches and bytecodes.
254
253
- **cleans.requirements** - Clean the project requirements file.
255
254
- **cleans.reset** - Run all tools, folders, and sources tasks.
256
255
- **cleans.ruff** - Clean the ruff tool.
257
256
- **cleans.sources** - Run all sources tasks.
258
257
- **cleans.tools** - Run all tools tasks.
258
+
- **cleans.uv** - Clean uv lock file.
259
259
- **cleans.venv** - Clean the venv folder.
260
260
- **commits.all (commits)** - Run all commit tasks.
261
261
- **commits.bump** - Bump the version of the package.
@@ -272,8 +272,8 @@ $ inv --list
272
272
- **formats.imports** - Format python imports with ruff.
273
273
- **formats.sources** - Format python sources with ruff.
274
274
- **installs.all (installs)** - Run all install tasks.
275
-
- **installs.poetry** - Install poetry packages.
276
275
- **installs.pre-commit** - Install pre-commit hooks on git.
276
+
- **installs.uv** - Install uv packages.
277
277
- **mlflow.all (mlflow)** - Run all mlflow tasks.
278
278
- **mlflow.doctor** - Run mlflow doctor to diagnose issues.
279
279
- **mlflow.serve** - Start mlflow server with the given host, port, and backend uri.
@@ -684,17 +684,18 @@ Define and build modern Python package.
684
684
- [Source](https://docs.python.org/3/distutils/sourcedist.html): older format, less powerful
685
685
- [Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html): slow and hard to manage
0 commit comments