Sync your machine learning data to your favorite productivity tools
Project description
MLSync
MLSync is a productivity tool that syncs your ML data with productivity tools you love.
Installation
pip install mlsync
Example: MLFlow -> Notion
Sync your machine learning experiments to Notion in a few simple steps!
Configuration Setup
Let us first setup the run environment.
- To begin, checkout this repository:
git clone https://github.com/paletteml/mlsync.git
- Change to the
mlsync
directory:cd mlsync
- Rename the
.env.example
file in your path:mv .env.example .env
. This file is intended to store your personal API keys.
Note that the directory contains YAML files for configurations (config.yaml
) and report formatting (format.yaml
). We will leave the configurations as is for now.
ML Training Setup
Now let us setup our ML Training environment. For this example, we will rely on the MLFlow framework and Pytorch as our ML framework. Since MLFlow supports all major ML frameworks, this example can be easily adapted to other frameworks.
- If not already installed, install PyTorch based on the guide here. (Only needed for the provided example).
- Install
mlflow
package usingpip install mlflow
. More about installation here. - Run example training using
python mlflow_pytorch.py --run_name <Run 1>
. This will create a new MLFlow run. - Launch MLFlow UI using
mlflow ui &
. Copy the mlflow uri (seen in the command line as[INFO] Listening at: <URL>
). Let it run in the background. - Update the
uri
field in the configuration file in your folder (config.yaml
) undermlflow
with the just copied mlflow uri.
Notion Setup
Let us now link Notion to MLSync. This is required only for the first time you run MLSync.
- Create a new integration to Notion.
- Visit notion.so/my-integrations
- Click the
+ New Integration
button - Let us name it as
MLSync
. - Ensure
Read
,Update
andInsert
Content Capabilities are selected. - Copy your "Internal Integration Token" from your Notion integration page into the
.env
file in your path.NOTION_TOKEN=secret_0000000000000000000000000000000000000000000
- Create a new page in Notion. This will serve as the root page for your MLFlow runs.
- Click Share button on the top right corner of the page.
- Click Invite button and then choose
MLSync
integration. - Back in the
Share
dialog, click theCopy link
button. - Paste the URL to the
page_id
field in the configuration file (config.yaml
) undernotion
.
Syncing
You are now all set! Now let us sync your MLFlow runs to Notion.
mlsync --config config.yaml --report_format format.yaml
That's it! You can now view your MLFlow runs in Notion. As long as mlsync is running, all your future experiments and runs should appear in selected Notion page.
Advanced
- You can override the Notion page id, token, and other configurations by either modifying the
config.yaml
file or by passing the arguments to themlsync
command. Runmlsync --help
to see the available arguments. - Custom Report Formats:
mlsync
allows you to customize the report much further. You can customize the report by adding your ownformat.yaml
file. Read documentation here to learn more. - Custom Refresh Rates: You can control the refresh rate of the report by setting the
refresh_rate
field in the configuration file. - Restarting mlsync: You can restart mlsync any time without losing earlier runs.
Enjoy! If you have any further questions, please contact us.
Roadmap
We want to support different training enviroments and different productivty tools.
- Productivity Tools
- Notion: Supported
- Trello: Planned
- Confluence: In progress
- Jira: Planned
- Monitoring Frameworks
- MLFlow: Supported
- TensorBoard: Planned
- ClearML: Planned
Do you have other tools/frameworks you would like to see supported? Let us know!
Contributing
We welcome contributions from the community. Please feel free to open an issue or pull request. Or, if you are interested in working closely with us, please contact us directly. We will be happy to talk with you!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for mlsync-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8121948e97bb5accad9d63d9d2ede331427212301ea26f1d995cec898155ab65 |
|
MD5 | 33fe39028391382f2572df53cd2f7964 |
|
BLAKE2b-256 | 1ec48a4446e57a81cb6e4eb2c33e77b2c49423cdd273bdb0ea5a81a689844a5f |