Skip to content

Commit

Permalink
Merge pull request #59 from JuliaAI/pairing_with_mlflow_release_api_d…
Browse files Browse the repository at this point in the history
…efinition

Pairing with mlflow release api definition
  • Loading branch information
pebeto authored Feb 10, 2025
2 parents 6d9bfeb + 3628b3d commit 6acab99
Show file tree
Hide file tree
Showing 59 changed files with 3,608 additions and 1,825 deletions.
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.20.1" > ./requirements.txt
- uses: actions/setup-python@v4
with:
python-version: '3.12.3'
cache: 'pip'
- name: Setup mlflow locally
run: |
pip install -r ./requirements.txt
python3 /opt/hostedtoolcache/Python/3.12.3/x64/bin/mlflow server --app-name basic-auth --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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ Manifest.toml
/docs/build/
mlruns
coverage
Pipfile
Pipfile.lock
*.db
8 changes: 3 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,22 @@ 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"
HTTP = "1.0"
JSON = "0.21"
ShowCases = "0.1"
URIs = "1.0"
julia = "1.0"

[extras]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]

test = ["Base64", "Test"]
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"
35 changes: 13 additions & 22 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
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/logger.md",
"Miscellaneous operations" => "reference/misc.md",
"Run operations" => "reference/run.md",
"Registered model operations" => "reference/registered_model.md",
"Model version operations" => "reference/model_version.md",
"User operations" => "reference/user.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
```
15 changes: 15 additions & 0 deletions docs/src/reference/experiment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Experiment operations
```@docs
createexperiment
getexperiment
getexperimentbyname
deleteexperiment
restoreexperiment
updateexperiment
searchexperiments
setexperimenttag
createexperimentpermission
getexperimentpermission
updateexperimentpermission
deleteexperimentpermission
```
7 changes: 7 additions & 0 deletions docs/src/reference/logger.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
```
15 changes: 15 additions & 0 deletions docs/src/reference/model_version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Model version operations

```@docs
getlatestmodelversions
createmodelversion
getmodelversion
updatemodelversion
deletemodelversion
searchmodelversions
getdownloaduriformodelversionartifacts
transitionmodelversionstage
setmodelversiontag
deletemodelversiontag
getmodelversionbyalias
```
17 changes: 17 additions & 0 deletions docs/src/reference/registered_model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Registered model operations
```@docs
createregisteredmodel
getregisteredmodel
renameregisteredmodel
updateregisteredmodel
deleteregisteredmodel
searchregisteredmodels
setregisteredmodeltag
deleteregisteredmodeltag
deleteregisteredmodelalias
setregisteredmodelalias
createregisteredmodelpermission
getregisteredmodelpermission
updateregisteredmodelpermission
deleteregisteredmodelpermission
```
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
```
25 changes: 25 additions & 0 deletions docs/src/reference/types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Types
```@docs
MLFlow
Tag
ViewType
RunStatus
ModelVersionStatus
Dataset
DatasetInput
FileInfo
ModelVersion
RegisteredModel
RegisteredModelAlias
Experiment
Run
Param
Metric
RunData
RunInfo
RunInputs
User
Permission
ExperimentPermission
RegisteredModelPermission
```
8 changes: 8 additions & 0 deletions docs/src/reference/user.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# User operations
```@docs
createuser
getuser
updateuserpassword
updateuseradmin
deleteuser
```
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

0 comments on commit 6acab99

Please sign in to comment.