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
argparseparsed 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.runsearch, 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)
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.15.tar.gz
(4.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thetaspaceray-0.0.15.tar.gz.
File metadata
- Download URL: thetaspaceray-0.0.15.tar.gz
- Upload date:
- Size: 4.0 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 |
43f430ea72bfd1efe25f30d8e8da5a7364bb5e8af06fa6fbea0cc7f4f4544afd
|
|
| MD5 |
7b811ba5433828c13c186508cd4470c0
|
|
| BLAKE2b-256 |
15a154b9a86a91d59f7c77b525f726ae458f3c053c7ffcfb5cbcc62b1586d439
|
File details
Details for the file thetaspaceray-0.0.15-py3-none-any.whl.
File metadata
- Download URL: thetaspaceray-0.0.15-py3-none-any.whl
- Upload date:
- Size: 4.1 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 |
b1702947a24af4bccd52af983d741b9cedd0ab767582ba370cf2afe324df9da6
|
|
| MD5 |
f89225466364574f1eda5a826290ca8e
|
|
| BLAKE2b-256 |
93efcaea634e331e69e1a4a768f97ca57cfa60e144dd77c3dccdf2a4816634c5
|