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

Pairing with mlflow release api definition #59

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
name: CI
on:
pull_request:
push:
branches:
- main
tags: '*'
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:

services:
mlflow:
image: adacotechjp/mlflow:2.3.1
ports:
- 5000:5000

name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 1
matrix:
version:
- '1.6'
- '1'
- '1.10'
- '1' # automatically expands to the latest stable 1.x release of Julia.
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- name: Setup custom python requirements
if: hashFiles('**/requirements.txt', '**/pyproject.toml') == ''
run: |
touch ./requirements.txt
echo "mlflow==2.17.2" > ./requirements.txt
- uses: actions/setup-python@v4
with:
python-version: '3.10.13'
cache: 'pip'
- name: Setup mlflow locally
run: |
pip install -r ./requirements.txt
python3 /opt/hostedtoolcache/Python/3.10.13/x64/bin/mlflow server --host 0.0.0.0 --port 5000 &
sleep 5
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
Expand All @@ -50,9 +53,10 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
JULIA_NUM_THREADS: '2'
MLFLOW_TRACKING_URI: "http://localhost:5000/api"
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v3
with:
files: lcov.info
docs:
Expand Down
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ version = "0.5.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
ShowCases = "605ecd9f-84a6-4c9e-81e2-4798472b76a3"
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
FilePathsBase = "0.9"
HTTP = "1.9"
JSON = "0.21"
ShowCases = "0.1"
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@


Julia client for [MLFlow](https://www.mlflow.org/)

This package is still under development and interfaces may change. See the documentation for current features and limitations.

Tested against `mlflow==1.21.0` and `mlflow==1.22.0`.
4 changes: 1 addition & 3 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
MLFlowClient = "64a0f543-368b-4a9a-827a-e71edb2a0b83"
ShowCases = "605ecd9f-84a6-4c9e-81e2-4798472b76a3"
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
33 changes: 11 additions & 22 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
using MLFlowClient
push!(LOAD_PATH,"../src/")
using Documenter

DocMeta.setdocmeta!(MLFlowClient, :DocTestSetup, :(using MLFlowClient); recursive=true)
using MLFlowClient

makedocs(;
modules=[MLFlowClient],
authors="@deyandyankov and contributors",
repo="https://github.com/JuliaAI.jl/blob/{commit}{path}#{line}",
sitename="MLFlowClient.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://juliaai.github.io/MLFlowClient.jl",
assets=String[]
),
pages=[
"Home" => "index.md",
"Tutorial" => "tutorial.md",
"Reference" => "reference.md"
],
checkdocs=:exports
)
authors="@deyandyankov and contributors",
pages=["Home" => "index.md", "Tutorial" => "tutorial.md", "Reference" => [
"Types" => "reference/types.md", "Artifact operations" => "reference/artifact.md",
"Experiment operations" => "reference/experiment.md",
"Logging operations" => "reference/loggers.md",
"Miscellaneous operations" => "reference/misc.md",
"Run operations" => "reference/run.md",
"Registered model operations" => "reference/registered_model.md"]])

deploydocs(;
repo="github.com/JuliaAI/MLFlowClient.jl",
devbranch="main"
)
deploydocs(; repo="github.com/JuliaAI/MLFlowClient.jl", devbranch="main")
File renamed without changes
File renamed without changes
File renamed without changes
59 changes: 0 additions & 59 deletions docs/src/reference.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/src/reference/artifact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Artifact operations
```@docs
listartifacts
```
11 changes: 11 additions & 0 deletions docs/src/reference/experiment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Experiment operations
```@docs
createexperiment
getexperiment
getexperimentbyname
deleteexperiment
restoreexperiment
updateexperiment
searchexperiments
setexperimenttag
```
7 changes: 7 additions & 0 deletions docs/src/reference/loggers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Logging operations
```@docs
logmetric
logbatch
loginputs
logparam
```
5 changes: 5 additions & 0 deletions docs/src/reference/misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Miscellaneous operations
```@docs
getmetrichistory
refresh
```
8 changes: 8 additions & 0 deletions docs/src/reference/registered_model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Registered model operations
```@docs
createregisteredmodel
getregisteredmodel
renameregisteredmodel
updateregisteredmodel
deleteregisteredmodel
```
11 changes: 11 additions & 0 deletions docs/src/reference/run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Run operations
```@docs
createrun
deleterun
restorerun
getrun
setruntag
deleteruntag
searchruns
updaterun
```
21 changes: 21 additions & 0 deletions docs/src/reference/types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Types
```@docs
MLFlow
Tag
ViewType
RunStatus
ModelVersionStatus
Dataset
DatasetInput
FileInfo
ModelVersion
RegisteredModel
RegisteredModelAlias
Experiment
Run
Param
Metric
RunData
RunInfo
RunInputs
```
6 changes: 3 additions & 3 deletions docs/src/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ p

This could result in the following plot:

![](withoutmlflow.png)
![](images/withoutmlflow.png)

Now, suppose that you are interested in turning this into an experiment which stores its metadata and results in MLFlow using `MLFlowClient`. You could amend the code like this:

Expand Down Expand Up @@ -114,8 +114,8 @@ updaterun(mlf, exprun, "FINISHED")

This will result in the folowing experiment created in your `MLFlow` which is running on `http://localhost/`:

![](mlflowexp.png)
![](images/mlflowexp.png)

You can also observe series logged against individual metrics, i.e. `pricepath1` looks like this in `MLFlow`:

![](mlflowexpmetric1.png)
![](images/mlflowexpmetric1.png)
Loading
Loading