Notion
Notion needs no introduction. It’s a simple, powerful, and easy-to-use productivity tool that helps plan and organize projects. MLSync can make it even more powerful by syncing your ML project data directly to Notion.
Notion Configuration
MLSync requires the following configurations to access Notion pages.
Note
MLSync does NOT have access to your entire Notion workspace. It only has access to the specific pages you have shared with MLSync integration.
- Notion API Token: This is the token that MLSync will use to authenticate with Notion. To generate this, you can perform the following steps:
Visit [notion.so/my-integrations](https://www.notion.so/my-integrations)
Click the + New Integration button
Let us name it as MLSync.
Ensure Read, Update and Insert Content Capabilities are selected.
Copy your “Internal Integration Token” from your Notion integration page.
There are three ways to use this token with MLSync:
Directly: You can pass this token directly with the
--notion-token
argument withmlsync
command.Via environment variable: You can set the
NOTION_TOKEN
environment variable in your terminal by running the following command:export NOTION_TOKEN=<your token>
Via configuration file: You can set the
token
key in thenotion
section of yourconfig.yaml
file..env file (preferred): You can set the
NOTION_TOKEN
environment variable in your.env
:NOTION_TOKEN=secret_0000000000000000000000000000000000000000000
Note
Unless you explicitly save your notion token in a file, we will not store them anywhere.
- 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
.
There are two ways to use this page_id with MLSync: 1. Directly: You can pass this page_id directly with the
--notion-page-id
argument withmlsync
command. 2. Via configuration file: You can set thepage_id
key in thenotion
section of yourconfig.yaml
file.If you pass the page id in the command line, it will override the page id in the config file and store the same in the config file for future runs.
Below is an example config.yaml
file for MLFlow:
notion: token: <your token> page_id: <your page id>