This is the MML SQL plugin, providing an SQL backend for mml multiruns.
Project description
MML SQL plugin
This plugin provides SQL support for the optuna multiruns of MML.
Install
Install the plugin with pip. In addition, you require the mysqlclient package.
pip install mysqlclient
You also need to prepare the sql backend and add some information to your mml.env file.
set up my sql database
Install MySQL and enter interactive MySQL session:
sudo apt-get install mysql-server default-libmysqlclient-dev
sudo mysql -u root -p
Create MySQL user and database (you can use different names for database, user and password):
mysql> CREATE DATABASE IF NOT EXISTS mml_hpo;
mysql> CREATE USER 'mml_user'@'%' IDENTIFIED WITH mysql_native_password BY 'password123';
mysql> GRANT ALL PRVILEGES ON mml_hpo.* TO 'mml_user'@'%';
mysql> FLUSH PRIVILEGES;
set up secrets
This plugin expects the following secrets in the mml.env file (adapt to your previously chosen values):
export MML_MYSQL_USER=mml_user
export MML_MYSQL_PW=password123
export MML_MYSQL_PORT=3306
export MML_HOSTNAME_OF_MYSQL_HOST=localhost
export MML_MYSQL_DATABASE=mml_hpo
grant access to other workstations
This part is optional and only required if you want other machines to access your local database (e.g. from a remote cluster):
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
# change the line 'bind-adress = ...' to be a comment by adding a hashtag in front
# do not forget to save changes!
service mysql restart
Usage
Instead of hpo=default just use hpo=sql when starting your mml ... --multirun.
Note
Since mysqlclient has a GPL-2.0 license this feature is outsourced to an internal plugin instead of mml-core.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mml_sql-0.3.0.tar.gz.
File metadata
- Download URL: mml_sql-0.3.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adfd28b85470c34ddaef276fb6a783aff708d511d9433a1c9fce2b23929e6788
|
|
| MD5 |
81549706a26c53b41ce0da4eddf1d650
|
|
| BLAKE2b-256 |
584eba9db824e1373f0b122c5a43c62a107bf9aa6853a314e6c9782ad5a437b8
|
Provenance
The following attestation bundles were made for mml_sql-0.3.0.tar.gz:
Publisher:
publish.yml on IMSY-DKFZ/mml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mml_sql-0.3.0.tar.gz -
Subject digest:
adfd28b85470c34ddaef276fb6a783aff708d511d9433a1c9fce2b23929e6788 - Sigstore transparency entry: 158552133
- Sigstore integration time:
-
Permalink:
IMSY-DKFZ/mml@30ab567b6df433e09cd24eae79d3c78a43a287a0 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/IMSY-DKFZ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@30ab567b6df433e09cd24eae79d3c78a43a287a0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mml_sql-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mml_sql-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66d0cdf9efdbb057a27bdad55ac7cbed07c8e16ccacdc537fb3628949c2c086f
|
|
| MD5 |
70fde20d3df3081944d8d0d0de10c975
|
|
| BLAKE2b-256 |
a4b5861c4f262e06eae73b8d6bb68666a7ef273dc770c27b6f4f557697b7d38b
|
Provenance
The following attestation bundles were made for mml_sql-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on IMSY-DKFZ/mml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mml_sql-0.3.0-py3-none-any.whl -
Subject digest:
66d0cdf9efdbb057a27bdad55ac7cbed07c8e16ccacdc537fb3628949c2c086f - Sigstore transparency entry: 158552134
- Sigstore integration time:
-
Permalink:
IMSY-DKFZ/mml@30ab567b6df433e09cd24eae79d3c78a43a287a0 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/IMSY-DKFZ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@30ab567b6df433e09cd24eae79d3c78a43a287a0 -
Trigger Event:
push
-
Statement type: