example_bayesian_optimization_parser
Bayesian Optimization Parser example
ExampleBayesianOptimizationParser
ExampleBayesianOptimizationParser()
Bases: Parser
An example I/O parser for testing the Bayesian Optimization sampler.
Methods
read_output_file(params: dict, run_dir: str) -> dict
Reads the output file and returs a dictionary with the
input settings and the output file.
write_input_file():
This is a dummy function that is not actually needed.
collect_sample_information(run_dir: str) -> dict
Collects the scoring information needed for Bayesian
optimization.
Initializes the ExampleBayesianOptimizationParser object.
Source code in src/enchanted_surrogates/parsers/example_bayesian_optimization_parser.py
31 32 33 34 35 36 | |
collect_sample_information
collect_sample_information(run_dir, observations)
Reads the information from the run directory that is needed for the Bayesian optimization sampler.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_dir
|
str
|
Directory where the run has been conducted. |
required |
observations
|
dict
|
Dictionary of observations (not actually used by this example) |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Dictionary containing the information needed for the BO routines. |
Source code in src/enchanted_surrogates/parsers/example_bayesian_optimization_parser.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
read_output_file
read_output_file(run_dir)
Reads the output files from the run directory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run_dir
|
str
|
Directory where the output file is located. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Dictionary containing the settings and the output dictionaries. |
Source code in src/enchanted_surrogates/parsers/example_bayesian_optimization_parser.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
write_input_file
write_input_file()
This is not actually needed.
Source code in src/enchanted_surrogates/parsers/example_bayesian_optimization_parser.py
38 39 40 41 42 | |