neural_compressor.compression.hpo.search_algorithms
Module Contents
Classes
Base class for defining the common methods of different search algorithms. |
|
Grid search. |
|
Random search. |
|
Bayesian Optimization. |
|
XGBoost searcher. |
Functions
|
Class decorator to register a Searcher subclass to the registry. |
- neural_compressor.compression.hpo.search_algorithms.register_searcher(name)[source]
Class decorator to register a Searcher subclass to the registry.
Decorator function used before a Pattern subclass. Make sure that the Searcher class decorated by this function can be registered in SEARCHERS.
- Parameters:
cls (class) – The subclass of register.
name – A string. Define the searcher type.
- Returns:
The class of register.
- Return type:
cls
- class neural_compressor.compression.hpo.search_algorithms.Searcher(search_space)[source]
Base class for defining the common methods of different search algorithms.
- Parameters:
search_space (dict) – A dictionary for defining the search space.
- class neural_compressor.compression.hpo.search_algorithms.GridSearcher(search_space)[source]
Grid search.
Search the whole search space exhaustively.
- Parameters:
search_space (dict) – A dictionary for defining the search space.
- class neural_compressor.compression.hpo.search_algorithms.RandomSearcher(search_space)[source]
Random search.
Search the whole search space randomly.
- Parameters:
search_space (dict) – A dictionary for defining the search space.
- class neural_compressor.compression.hpo.search_algorithms.BayesianOptimizationSearcher(search_space, seed=42)[source]
Bayesian Optimization.
Search the search space with Bayesian Optimization.
- Parameters:
search_space (dict) – A dictionary for defining the search space.
- class neural_compressor.compression.hpo.search_algorithms.XgbSearcher(search_space, higher_is_better=True, loss_type='reg', min_train_samples=10, seed=42)[source]
XGBoost searcher.
Search the search space with XGBoost model.
- Parameters:
search_space (dict) – A dictionary for defining the search space.