-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,32 @@ | ||
# YAML Usage in NePS for MNIST Classification | ||
# Declarative Usage in NePS for Neural Network Optimization | ||
|
||
Within this folder, you'll find examples and templates tailored for optimizing neural networks on the MNIST dataset | ||
through NePS, all configured via YAML files. These YAML files allow for the easy adjustment of experiment parameters | ||
and search spaces, enabling you to fine-tune your classification model without directly modifying any Python code. | ||
Below is a succinct overview of each provided file and its role in the optimization process: | ||
This folder contains examples and templates for optimizing neural networks using NePS, configured via YAML files. | ||
These configurations allow easy adjustments to experiment parameters and search spaces, enabling fine-tuning of your | ||
models without modifying Python code. | ||
### `hpo_example.py` | ||
|
||
This Python script demonstrates how to utilize a YAML file to configure a hyperparameter optimization (HPO) task in | ||
NePS. It's designed to show you how to integrate YAML configurations with your Python code to set up HPO experiments. | ||
The script reads YAML files to get its parameters and search spaces, illustrating how to run HPO tasks with minimal | ||
coding effort. Additionally, it includes an example of a run_pipeline function, guiding users on how to define their | ||
model training and evaluation process within the optimization framework. | ||
### `pipeline_space.yaml` | ||
This Python script demonstrates how to integrate NePS with a neural network training pipeline for hyperparameter | ||
optimization. It utilizes a YAML configuration file to set up and run the experiments. | ||
|
||
This YAML file defines the search space for your pipeline, including the parameters and their ranges to be explored | ||
during the search. It's structured to be easily readable and modifiable, allowing you to quickly adjust the search | ||
space for your experiments. This file is referenced by the configuration YAML file `run_args.yaml` to dynamically load | ||
the search configuration. | ||
```python | ||
--8<-- "neps_examples/declarative_usage/hpo_example.py" | ||
``` | ||
|
||
### `run_args.yaml` | ||
### `config.yaml` | ||
|
||
This file showcases an example set of NePS arguments, simplifying its usage. By editing this file, | ||
users can customize their experiments without needing to modify the Python script. | ||
This YAML file defines the NePS arguments for the experiment. By editing this file, users can customize their | ||
experiments without modifying the Python script. | ||
|
||
### `run_args_alternative.yaml` | ||
|
||
An alternative set of arguments. This file has listed the full set of arguments and includes explanations for each of | ||
them. Additionally, it demonstrates how you can structure your YAML file for improved clarity. | ||
```yaml | ||
--8<-- "neps_examples/declarative_usage/config.yaml" | ||
``` | ||
|
||
## Quick Start Guide | ||
|
||
1. **Review the YAML Files:** Start by looking at `pipeline_space.yaml`, `run_args.yaml`, and `run_args_alternative.yaml` to understand the available configurations and how they're structured. | ||
2. **Run the Example Script:** Execute `hpo_example.py`, specifying which YAML file to use for the run arguments. This will initiate an HPO task based on your YAML configurations. | ||
3. **Modify YAML Files:** Experiment with adjusting the parameters in the YAML files to see how changes affect your search experiments. This is a great way to learn about the impact of different configurations on your results. | ||
1. **Review the YAML File:** Examine `config.yaml` to understand the available configurations and how they are structured. | ||
2. **Run the Example Script:** Execute hpo_example.py, by providing `config.yaml` via the run_args agrument to NePS. | ||
This will initiate a hyperparameter optimization task based on your YAML configurations. | ||
3. **Modify YAML File:** Experiment with adjusting the parameters in the YAML file to see how changes affect your | ||
search experiments. This is a great way to learn about the impact of different configurations on your results. | ||
|
||
By following these steps and utilizing the provided YAML files, you'll be able to efficiently set up, run, and modify your NePS experiments. Enjoy the flexibility and simplicity that comes with managing your experiment configurations in YAML! |