https://github.com/twsl/lit-mlflow
An improved Lightning mlflow logger to replace mlflow.autolog()
https://github.com/twsl/lit-mlflow
databricks lightning mlflow pytorch pytorch-lightning
Last synced: about 1 month ago
JSON representation
An improved Lightning mlflow logger to replace mlflow.autolog()
- Host: GitHub
- URL: https://github.com/twsl/lit-mlflow
- Owner: twsl
- License: mit
- Created: 2024-04-22T17:37:22.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T13:10:02.000Z (3 months ago)
- Last Synced: 2025-03-20T09:47:40.082Z (2 months ago)
- Topics: databricks, lightning, mlflow, pytorch, pytorch-lightning
- Language: Python
- Homepage: https://twsl.github.io/lit-mlflow/
- Size: 844 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# lit-mlflow
[](https://github.com/twsl/lit-mlflow/actions/workflows/build.yaml)
[](https://github.com/twsl/lit-mlflow/actions/workflows/docs.yaml)

[](https://pypi.org/project/lit-mlflow/)
[](https://pypi.org/project/lit-mlflow/)
[](https://github.com/twsl/lit-mlflow/pulls?utf8=%E2%9C%93&q=is:pr%20author:app/dependabot)
[](https://squidfunk.github.io/mkdocs-material/)
[](https://python-poetry.org/)
[](https://github.com/astral-sh/ruff)
[](.pre-commit-config.yaml)
[](https://microsoft.github.io/pyright/)
[](https://github.com/PyCQA/bandit)
[](https://github.com/twsl/lit-mlflow/releases)
[](https://github.com/copier-org/copier)
[](LICENSE)An improved Lightning mlflow logger. Works seamlessly with PyTorch Lightning on Databricks and offers more control compared to the `mlflow.pytorch.autolog` function.
## Features
- Makes `MLflow` logging work with `lightning` and [Databricks](https://www.databricks.com/)
## Installation
With `pip`:
```bash
python -m pip install lit-mlflow
```With [`poetry`](https://python-poetry.org/):
```bash
poetry add lit-mlflow
```## How to use it
Replace `mlflow.autolog()` with the `MlFlowAutoCallback`:```python
from lit_mlflow import MlFlowAutoCallback
import lightning.pytorch as pltrainer = pl.Trainer(
callbacks=[
MlFlowAutoCallback()
]
)
```To support Databricks mlflow, use the `DbxMLFlowLogger` instead of the `MlFlowLogger`:
```python
from lit_mlflow import DbxMLFlowLogger
import lightning.pytorch as pltrainer = pl.Trainer(
logger=[
DbxMLFlowLogger()
]
)
```## Docs
```bash
poetry run mkdocs build -f ./docs/mkdocs.yml -d ./_build/
```## Update template
```bash
copier update --trust -A --vcs-ref=HEAD
```## Credits
This project was generated with [](https://github.com/twsl/python-project-template)