Share via


SamplerConfig Class

Class to hold sampler configuration.

Initialize all attributes.

Constructor

SamplerConfig(_id: str, sampler_args: Any | None = None, sampler_kwargs: Any | None = None)

Parameters

Name Description
_id
Required

Id of the sampler.

sampler_args

Arguments to be send to the sampler.

Default value: None
sampler_kwargs

Keyword arguments to be send to the sampler.

Default value: None

Methods

from_dict

Load from dictionary.

from_dict

Load from dictionary.

from_dict(dct: Dict[str, Any]) -> SamplerConfig

Parameters

Name Description
cls
Required

Class object of SamplerConfig

dct
Required

Dictionary holding all the needed params.

Returns

Type Description

Created object.

Attributes

id

Get the id of the object.

Returns

Type Description

The id.

sampler_args

Get the sampler args to be sent to the instance of the sampler.

Returns

Type Description

The args.

sampler_kwargs

Get the sampler kwargs to be sent to the instance of the sampler.

Returns

Type Description

The key word arguments.