DARTS Profile
- class confopt.profile.DARTSProfile(searchspace_type: str | SearchSpaceType, epochs: int, **kwargs: Any)
Bases:
BaseProfile
,ABC
Train Profile class for DARTS (Differentiable Architecture Search). It inherits from the BaseProfile class and sets the sampler config for DARTS sampler.
- __init__()
Initializes the DARTSProfile object.
- _initialize_sampler_config()
Initializes the sampler configuration for DARTS.
- configure_sampler(**kwargs) None
Configures the sampler settings based on provided keyword arguments.
The configuration options are passed as keyword arguments.
- Parameters:
**kwargs – Arbitrary keyword arguments. Possible keys include: sample_frequency (str): The rate at which samples should be taken arch_combine_fn (str): The function used to combine architectures when FairDARTS is used, this should be ‘sigmoid’. Default value is ‘default’.
Example
>>> from confopt.profile import DARTSProfile >>> darts_profile = DARTSProfile(searchspace='darts', epochs=50) >>> darts_profile.configure_sampler(arch_combine_fn='sigmoid')
The accepted keyword arguments should align with the sampler’s configuration and the attributes can be configured dynamically.
- Raises:
ValueError – If an unrecognized keyword is passed in kwargs.
- Returns:
None