Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MLflow integration #40

Merged
merged 58 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
f04af15
clean up repo structure
AleksanderWWW May 2, 2023
75b93b5
prototype new exporter structure
AleksanderWWW May 5, 2023
fb2fbc4
export run info; delete unused code
AleksanderWWW May 5, 2023
e88e712
start neptune run as context manager
AleksanderWWW May 5, 2023
3a30b63
use env variables
AleksanderWWW May 5, 2023
d329442
neptune run ids as set
AleksanderWWW May 5, 2023
dd2cc99
check value of max artifact size
AleksanderWWW May 5, 2023
7602db0
pass tracking uri to mlflow client
AleksanderWWW May 5, 2023
6a1f4f8
artifact listing and iteration
AleksanderWWW May 9, 2023
b28a245
convert MB to bytes
AleksanderWWW May 9, 2023
c350b4d
update gitignore
AleksanderWWW May 10, 2023
1689f26
add tests for sync
AleksanderWWW May 10, 2023
8e661f0
add tests for export + refactor
AleksanderWWW May 10, 2023
b127e5a
refactor test
AleksanderWWW May 10, 2023
00486ea
handle time series metrics
AleksanderWWW May 11, 2023
d65c5c7
implement integration as a class
AleksanderWWW May 11, 2023
feaab96
var name refactor
AleksanderWWW May 11, 2023
5be8fe1
add tests for NeptuneExporter
AleksanderWWW May 15, 2023
7809627
create entry point for neptune-mlflow
AleksanderWWW May 15, 2023
b63aab6
fix entrypoint
AleksanderWWW May 15, 2023
c3c8fd5
update plugin tests
AleksanderWWW May 15, 2023
aab424d
split run exporting to two methods
AleksanderWWW May 15, 2023
07518ea
refactor _export_run_data
AleksanderWWW May 15, 2023
c8d6a47
change tests dir structure
AleksanderWWW May 15, 2023
7bda1c6
add .neptune to gitignore
AleksanderWWW May 15, 2023
4ab775b
update gitignore
AleksanderWWW May 15, 2023
bbf5bd9
add GH actions
AleksanderWWW May 15, 2023
4c55e29
add project name to constructor
AleksanderWWW May 15, 2023
79deecc
add e2e test
AleksanderWWW May 17, 2023
fe84a3a
add tensorflow to dev requirements
AleksanderWWW May 17, 2023
cc9e2e4
begin redesigning artifact upload and experiment metadata export
AleksanderWWW May 24, 2023
c14d826
adjust e2e
AleksanderWWW May 24, 2023
0d1bc5d
implement dir upload strategy
AleksanderWWW May 25, 2023
5cffc54
repo cleanup
AleksanderWWW May 25, 2023
5d97657
fix pyproject file
AleksanderWWW May 25, 2023
e9a2dc5
include-artifacts -> exclude-artifacts
AleksanderWWW May 25, 2023
6ec4356
update docstring
AleksanderWWW May 25, 2023
0557f83
final repo cleanup
AleksanderWWW May 25, 2023
bb01655
Apply suggestions from docs review
AleksanderWWW May 27, 2023
9e182f0
update doc strings
AleksanderWWW May 31, 2023
5a74d9e
fix unit test - mlflow client was not patched
AleksanderWWW May 31, 2023
7ff7d2d
import from neptune in try-except block
AleksanderWWW Jun 2, 2023
571c45f
only remove existing directories
AleksanderWWW Jun 2, 2023
1528883
add unit tests for utils
AleksanderWWW Jun 2, 2023
7ce6485
add CHANGELOG
AleksanderWWW Jun 2, 2023
8c5a192
correct changelog
AleksanderWWW Jun 2, 2023
c78f2e1
spelling of frameworks
normandy7 Jun 9, 2023
69665c8
fix artifact_startegy
AleksanderWWW Jun 13, 2023
b5edcc5
test on windows as well
AleksanderWWW Jun 15, 2023
d745de9
add and update license headers
AleksanderWWW Jun 15, 2023
21ab709
add version file that also checks if neptune installed
AleksanderWWW Jun 15, 2023
2bfac21
split exporter to smaller components
AleksanderWWW Jun 15, 2023
14c01ea
delete bad tests
AleksanderWWW Jun 15, 2023
bef0ac9
move version higher up in the catalog tree
AleksanderWWW Jun 15, 2023
abfbcd6
apply review + self-review
AleksanderWWW Jun 16, 2023
096247c
add exception handling to the orchestrator
AleksanderWWW Jun 16, 2023
2badac2
apply code review suggestions
AleksanderWWW Jun 21, 2023
1d80316
fix tests
AleksanderWWW Jun 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/actions/e2e/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README should be updated as well 😉 (or removed)

name: Test E2E
description: Run e2e tests
inputs:
working_directory:
description: "Working directory"
required: false
default: .
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: neptune-ai/neptune-mlflow
path: ${{ inputs.working_directory }}

- name: Install dependencies
working-directory: ${{ inputs.working_directory }}
run: pip install -e .[dev]
shell: bash

- name: Run tests
working-directory: ${{ inputs.working_directory }}
run: pytest -v tests/e2e
shell: bash
26 changes: 26 additions & 0 deletions .github/actions/unit/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Unit test
description: Run unit tests
inputs:
working_directory:
description: "Working directory"
required: false
default: .
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: neptune-ai/neptune-mlflow
path: ${{ inputs.working_directory }}

- name: Install dependencies
working-directory: ${{ inputs.working_directory }}
run: pip install -e .[dev]
shell: bash

- name: Run tests
working-directory: ${{ inputs.working_directory }}
run: pytest -v tests/unit
shell: bash
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: neptune-mlflow
on: [push]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
pip install -e .[dev]

- name: Pre-commit
run: |
pre-commit run --show-diff-on-failure --color=always

e2e:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9]
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Test
env:
NEPTUNE_API_TOKEN: ${{ secrets.E2E_NEPTUNE_API_TOKEN }}
NEPTUNE_PROJECT: e2e-tests/e2e
uses: ./.github/actions/e2e

unit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Test
uses: ./.github/actions/unit

publish:
needs: [pre-commit, e2e, unit]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install build dependencies
run: pip install poetry poetry-dynamic-versioning

- name: Build package
run : |
poetry build

- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.5.1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist
19 changes: 0 additions & 19 deletions .github/workflows/pre-commit.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,10 @@ venv.bak/

# Pycharm
.idea/

# MLflow
mlruns/
test_tracking_uri/

# Neptune
.neptune/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
args: [--settings-path, pyproject.toml]
Expand Down
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## [UNRELEASED] neptune-mlflow 1.0.0

### Changes
- Updated MLflow exporter to work with the current neptune.ai API ([#40](https://github.com/neptune-ai/neptune-mlflow/pull/40))
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

13 changes: 0 additions & 13 deletions Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions docs_requirements.txt

This file was deleted.

58 changes: 0 additions & 58 deletions git_version.py

This file was deleted.

77 changes: 77 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,77 @@
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"

[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
pattern = "default-unprefixed"

[tool.poetry.dependencies]
python = "^3.7"

# Python lack of functionalities from future versions
importlib-metadata = { version = "*", python = "<3.8" }

mlflow = ">=1.24.0"
# dev
pre-commit = { version = "*", optional = true }
pytest = { version = ">=5.0", optional = true }
pytest-cov = { version = "2.10.1", optional = true }
neptune = { version = ">=1.0.0", optional = true }
tensorflow = { version = ">2.0.0", optional = true }

[tool.poetry.extras]
dev = [
"pre-commit",
"pytest",
"pytest-cov",
"neptune",
"tensorflow",
]

[tool.poetry]
authors = ["neptune.ai <contact@neptune.ai>"]
description = "neptune.ai MLflow integration library"
repository = "https://github.com/neptune-ai/neptune-mlflow"
homepage = "https://neptune.ai/"
documentation = "https://docs.neptune.ai/integrations/mlflow/"
include = ["CHANGELOG.md"]
license = "Apache License 2.0"
name = "neptune-mlflow"
readme = "README.md"
version = "0.0.0"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? We're not testing it on Windows currently 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we are 😉

"Operating System :: POSIX",
"Operating System :: Unix",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
keywords = [
"MLOps",
"ML Experiment Tracking",
"ML Model Registry",
"ML Model Store",
"ML Metadata Store",
]
packages = [
{ include = "neptune_mlflow_exporter", from = "src" },
]

[tool.poetry.urls]
"Tracker" = "https://github.com/neptune-ai/neptune-mlflow/issues"
"Documentation" = "https://docs.neptune.ai/integrations/mlflow/"

[tool.black]
line-length = 120
target-version = ['py37', 'py38', 'py39', 'py310']
Expand All @@ -21,3 +95,6 @@ force_grid_wrap = 2
[tool.flake8]
max-line-length = 120
extend-ignore = "E203"

[tool.poetry.plugins."neptune.plugins"]
"mlflow" = "neptune_mlflow_exporter:sync"
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.