Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mml_sql-0.3.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mml_sql-0.3.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

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

Hashes for mml_sql-0.3.0.tar.gz
Algorithm Hash digest
SHA256 adfd28b85470c34ddaef276fb6a783aff708d511d9433a1c9fce2b23929e6788
MD5 81549706a26c53b41ce0da4eddf1d650
BLAKE2b-256 584eba9db824e1373f0b122c5a43c62a107bf9aa6853a314e6c9782ad5a437b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mml_sql-0.3.0.tar.gz:

Publisher: publish.yml on IMSY-DKFZ/mml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for mml_sql-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66d0cdf9efdbb057a27bdad55ac7cbed07c8e16ccacdc537fb3628949c2c086f
MD5 70fde20d3df3081944d8d0d0de10c975
BLAKE2b-256 a4b5861c4f262e06eae73b8d6bb68666a7ef273dc770c27b6f4f557697b7d38b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mml_sql-0.3.0-py3-none-any.whl:

Publisher: publish.yml on IMSY-DKFZ/mml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page