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:
- Definition of objective function
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 duringtune.run
, defaults to "max" (optional)--metric
: metric used to guidetune.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
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
thetaspaceray-0.0.8.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file thetaspaceray-0.0.8.tar.gz
.
File metadata
- Download URL: thetaspaceray-0.0.8.tar.gz
- Upload date:
- Size: 3.8 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9446a0a8798fe59712326bf842df595a29b646af944454c2e079e5d195bf7d30 |
|
MD5 | 158a621ccd2061b7cd141ac9f140438b |
|
BLAKE2b-256 | 0bffcf1e6f2bca16453d573cd020628a418b9c722436d8c05cc7ea75f3a23ff7 |
File details
Details for the file thetaspaceray-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: thetaspaceray-0.0.8-py3-none-any.whl
- Upload date:
- Size: 3.9 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45197bb1c167884355290e7b475175c915e20eb7c96928ccd1e71e745090ff9a |
|
MD5 | 00748659c1a15f05a6ae995893d47a77 |
|
BLAKE2b-256 | b706cd63758f0047e1926dd2506627dd81843ae5010b6807d2459c17b5990250 |