Skip to main content

Batched SpaceRay tuning.

Project description

Theta Integration for SpaceRay

Theta batching for SpaceRay package in order to submit Cobalt jobs and run spaces on different GPU nodes.

Installation

In order to use:

  • In order to use this package on ThetaGPU, you need two things:
    1. Definition of objective function
    2. argparse parsed argument space with the following required components:
    • --out: outfile
    • --json: json file of hyperparameter bounds
    • --trials: number of trials per space, not total
    • --mode: mode to apply during tune.run, defaults to "max" (optional)
    • --metric: metric used to guide tune.run search, defaults to "average_res" (optional)
    • --ray_dir: directory used to store Ray Tune logging files, defaults to /lus/theta-fs0/projects/CVD-Mol-AI/mzvyagin/ray_results (optional)

Example Usage

from argparse import ArgumentParser

### see ray tune docs for more info on how to define objective function and report metrics to ray tune
def objective_func(config):
    ### function training and testing using config from tune.run, then report results
    model.train()
    res = model.test()
    res_dict = {}
    res_dict['res'] = res
    tune.report(**res_dict)
    return res

if __name__ == "__main__":
   print("WARNING: default file locations are used to pickle arguments and hyperspaces. "
         "DO NOT RUN MORE THAN ONE EXPERIMENT AT A TIME.")
   print("Creating spaces.")
   parser = ArgumentParser("Run spaceray hyperparameter search on .")
   startTime = time.time()
   ray.init()
   parser.add_argument("-o", "--out")
   parser.add_argument("-m", "--model")
   parser.add_argument("-t", "--trials")
   parser.add_argument("-n", "--nodes", help="Number of GPU nodes to submit on.")
   parser.add_argument("-j", "--json", help="JSON file defining hyperparameter search space")
   arguments = parser.parse_args()
   theta_spaceray.run(objective_func, arguments)


Project details


Download files

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

Source Distribution

thetaspaceray-0.0.13.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

thetaspaceray-0.0.13-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file thetaspaceray-0.0.13.tar.gz.

File metadata

  • Download URL: thetaspaceray-0.0.13.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.0.3 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for thetaspaceray-0.0.13.tar.gz
Algorithm Hash digest
SHA256 6d37448040351851ecba4b50adbb07bef877091b02214bc20a5c5fab8e749634
MD5 386cb7a1de3d103e779a3fc08bfdeceb
BLAKE2b-256 ddb1242c8c802207c7c4c735d9a79139d53ae7c9a5e4f19b166527ff10346115

See more details on using hashes here.

File details

Details for the file thetaspaceray-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: thetaspaceray-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.0.3 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for thetaspaceray-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 1e67ee8011b1702af3d7655131c286d51931e2a5ff4113934e899c9a3e1eb8ec
MD5 d4e10facc9bc1ba09b34793cb1005cf9
BLAKE2b-256 aa82df3b351746929863a0487348a8d343f7b62450dc2ac5f0b0803f8156906c

See more details on using hashes here.

Supported by

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