aws / aws/sagemaker-python-sdk

Support Conditional Hyperparameter in AMT

Open
#4,058 0 comments 0 reactions 0 assignees View on GitHub
component: training type: feature request
Dominant language
Python
Stars
2.3k
Forks
1.3k
Avg merge
2d 2h
Merged PRs (30d)
32

Description

**Describe the feature you'd like**

Hyperparameter tuning frameworks like [optuna](https://optuna.org/) and google's [vertex AI](https://cloud.google.com/vertex-ai/docs/training/hyperparameter-tuning-overview#conditional_hyperparameters) all support some form of conditional hyperparameter. Could you consider supporting this feature in some capacity?

**How would this feature be used? Please describe.**

For instance, in training a cnn, we can define hyperparameters conditional on their parent hyperparameter matching some condition:

```
search_space = {}
if optimizer == 'adam':
search_space['adam_beta_1'] = range(...)
search_space['adam_beta_2'] = range(...)
elif optimizer == 'sgd':
...
```

**Describe alternatives you've considered**

Right now there are a few ways to work around this:

* Using optuna with sagemaker
* Enumerate all possible hyperparameters and handle appropriately in the training entry point (i.e., ignore the ones not needed)

It would be very helpful if this feature is supported by default. Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.