Set up SQLite database for Auptimizer

This code is running automatically during the setup. If needed, it can be used as

Usage: sqlite.py [OPTIONS] ENV_FILE

  Create database for **Auptimizer** with specified in env.ini file. 

  Copyright (C) 2018  LG Electronics Inc. 

  GPL-3.0 License. This program comes with ABSOLUTELY NO WARRANTY; 

  Arguments:     env_file {str}: Auptimizer environment file

Options:
  --user TEXT                    username for history tracking
  --cpu INTEGER                  number of CPUs to run parallel
  --name TEXT                    resource name, not used
  --log [debug|info|warn|error]  Log level
  -h, --help                     Show this message and exit.
/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/scipy/__init__.py:137: UserWarning: NumPy 1.16.5 or above is required for this version of SciPy (detected version 1.16.4)
  UserWarning)
/home/travis/virtualenv/python3.7.1/lib/python3.7/site-packages/torch/cuda/__init__.py:52: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at  /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
  return torch._C._cuda_getDeviceCount() > 0

APIs

create_database(config, usernames, cpu, name)[source]

Create new database for Auptimizer

Parameters
  • config (configparser.ConfigParser) – contains SQLITE_FILE, gpu_mapping under Auptimizer section

  • usernames (list(str)) – list of username, not used

  • cpu (int) – number of CPUs for parallel jobs

  • name (str) – node information, not used

reset(config)[source]

Close on-going jobs/experiment and reset resources without deleting existing results:

Parameters

config (configparser.ConfigParser) – contains SQLITE_FILE under Auptimizer section