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.
Metadata
Release files for mml-sql 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mml_sql-0.3.0.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mml_sql-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / mml_sql-0.3.0.tar.gz
| Download URL | mml_sql-0.3.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adfd28b85470c34ddaef276fb6a783aff708d511d9433a1c9fce2b23929e6788
|
|
BLAKE2b-256 checksum How to use checksums |
584eba9db824e1373f0b122c5a43c62a107bf9aa6853a314e6c9782ad5a437b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 31, 2024.
Transparency logRelease files / mml_sql-0.3.0-py3-none-any.whl
| Download URL | mml_sql-0.3.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66d0cdf9efdbb057a27bdad55ac7cbed07c8e16ccacdc537fb3628949c2c086f
|
|
BLAKE2b-256 checksum How to use checksums |
a4b5861c4f262e06eae73b8d6bb68666a7ef273dc770c27b6f4f557697b7d38b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 31, 2024.
Transparency log