Skip to content

Commit

Permalink
Adapting the new flat_params function from MLJBase and uploading firs…
Browse files Browse the repository at this point in the history
…t version of README
  • Loading branch information
pebeto committed Aug 14, 2023
1 parent 951fb8f commit 9444310
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# MLJFlow

[![Build Status](https://github.com/pebeto/MLJFlow.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/pebeto/MLJFlow.jl/actions/workflows/CI.yml?query=branch%3Amain)
| Branch | Build |
| :---: | :---: |
| dev | [![CI](https://github.com/pebeto/MLJFlow.jl/actions/workflows/CI.yml/badge.svg?branch=dev)](https://github.com/pebeto/MLJFlow.jl/actions/workflows/CI.yml) |

[MLJ](https://github.com/alan-turing-institute/MLJ.jl) is a Julia framework for
combining and tuning machine learning models. MLJFlow is a package that extends
the MLJ capabilities to use [MLFlow](https://mlflow.org/) as a backend for
model tracking and experiment management. To be specific, MLJFlow provides a
close to zero-preparation to use MLFlow with MLJ; by the usage of function
extensions that automate the MLFlow cycle (create experiment, create run, log
metrics, log parameters, log artifacts, etc.).

## Background
This project is part of the GSoC 2023 program. The proposal description can be
found [here](https://summerofcode.withgoogle.com/programs/2023/projects/iRxuzeGJ).
The entire workload is divided into three different repositories:
[MLJ.jl](https://github.com/alan-turing-institute/MLJ.jl),
[MLFlowClient.jl](https://github.com/JuliaAI/MLFlowClient.jl) and this one.

## Features
- [x] MLFlow cycle automation (create experiment, create run, log metrics, log
parameters, log artifacts, etc.)
- [x] Wrapper type used by MLJ to store MLFlow metadata and client instance
from MLFlowClient.jl
- [x] MLJ extended functions to allow MLFlow logging
- [x] Polished compatibility with composed models
- [ ] Polished compatibility with tuned models
- [ ] Polished compatibility with iterative models
2 changes: 1 addition & 1 deletion src/MLJFlow.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module MLJFlow

using MLJBase: info, name, Model,
Machine, deep_params, flat_params
Machine, flat_params
using OrderedCollections: LittleDict
using MLFlowClient: MLFlow, logparam, logmetric,
createrun, MLFlowRun, updaterun,
Expand Down
2 changes: 1 addition & 1 deletion src/client.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function logmodelparams(client::MLFlow, run::MLFlowRun, model::Model)
model_params = deep_params(model) |> flat_params |> collect
model_params = flat_params(model) |> collect
for (name, value) in model_params
logparam(client, run, name, value)
end
Expand Down

0 comments on commit 9444310

Please sign in to comment.