8.1.1.1.1.12. blueoil.cmd.tune_ray
¶
8.1.1.1.1.12.1. Module Contents¶
8.1.1.1.1.12.1.1. Classes¶
TrainTunable class interfaces with Ray framework |
8.1.1.1.1.12.1.2. Functions¶
|
Execute a command with timeout, and return both STDOUT/STDERR. |
|
|
|
Retrieve the best trial. |
|
Rename trial to shorter string |
|
Retrieve the last result from the best trial. |
|
Update selected parameters to the configuration of each trial |
|
helper function from lmnet/train.py to setup the data iterator |
|
|
|
-
blueoil.cmd.tune_ray.
subproc_call
(cmd, timeout=None)¶ Execute a command with timeout, and return both STDOUT/STDERR.
- Parameters
cmd (str) – the command to execute.
timeout (float) – timeout in seconds.
- Returns
If timeout, retcode is -1.
- Return type
output (bytes), retcode(int)
-
blueoil.cmd.tune_ray.
get_num_gpu
()¶ - Returns
#available GPUs in CUDA_VISIBLE_DEVICES, or in the system.
- Return type
int
-
blueoil.cmd.tune_ray.
get_best_trial
(trial_list, metric)¶ Retrieve the best trial.
-
blueoil.cmd.tune_ray.
trial_str_creator
(trial)¶ Rename trial to shorter string
-
blueoil.cmd.tune_ray.
get_best_result
(trial_list, metric, param)¶ Retrieve the last result from the best trial.
-
blueoil.cmd.tune_ray.
update_parameters_for_each_trial
(network_kwargs, chosen_kwargs)¶ Update selected parameters to the configuration of each trial
-
blueoil.cmd.tune_ray.
setup_dataset
(config, subset, rank)¶ helper function from lmnet/train.py to setup the data iterator
-
class
blueoil.cmd.tune_ray.
TrainTunable
¶ Bases:
ray.tune.Trainable
TrainTunable class interfaces with Ray framework
-
_setup
(self, config)¶
-
_train
(self)¶
-
_save
(self, checkpoint_dir)¶
-
_restore
(self, path)¶
-
-
blueoil.cmd.tune_ray.
run
(config_file, tunable_id, local_dir)¶
-
blueoil.cmd.tune_ray.
main
(config_file, tunable_id, local_dir)¶