sagemaker.core.parameter#

Placeholder docstring

Classes

CategoricalParameter(values)

A class for representing hyperparameters that have a discrete list of possible values.

ContinuousParameter(min_value, max_value[, ...])

A class for representing hyperparameters that have a continuous range of possible values.

IntegerParameter(min_value, max_value[, ...])

A class for representing hyperparameters that have an integer range of possible values.

ParameterRange(min_value, max_value[, ...])

Base class for representing parameter ranges.

class sagemaker.core.parameter.CategoricalParameter(values)[source]#

Bases: ParameterRange

A class for representing hyperparameters that have a discrete list of possible values.

as_json_range(name)[source]#

Represent the parameter range as a dictionary.

Dictionary is suitable for a request to create an Amazon SageMaker hyperparameter tuning job using one of the deep learning frameworks.

The deep learning framework images require that hyperparameters be serialized as JSON.

Parameters:

name (str) – The name of the hyperparameter.

Returns:

A dictionary that contains the name and values of the hyperparameter, where the values are serialized as JSON.

Return type:

dict[str, list[str]]

as_tuning_range(name)[source]#

Represent the parameter range as a dictionary.

It is suitable for a request to create an Amazon SageMaker hyperparameter tuning job.

Parameters:

name (str) – The name of the hyperparameter.

Returns:

A dictionary that contains the name and values of the hyperparameter.

Return type:

dict[str, list[str]]

classmethod cast_to_type(value)[source]#

Placeholder docstring

is_valid(value)[source]#

Placeholder docstring

class sagemaker.core.parameter.ContinuousParameter(min_value: int | float | PipelineVariable, max_value: int | float | PipelineVariable, scaling_type: str | PipelineVariable = 'Auto')[source]#

Bases: ParameterRange

A class for representing hyperparameters that have a continuous range of possible values.

Parameters:
  • min_value (float) – The minimum value for the range.

  • max_value (float) – The maximum value for the range.

classmethod cast_to_type(value)[source]#

Placeholder docstring

class sagemaker.core.parameter.IntegerParameter(min_value: int | float | PipelineVariable, max_value: int | float | PipelineVariable, scaling_type: str | PipelineVariable = 'Auto')[source]#

Bases: ParameterRange

A class for representing hyperparameters that have an integer range of possible values.

Parameters:
  • min_value (int) – The minimum value for the range.

  • max_value (int) – The maximum value for the range.

classmethod cast_to_type(value)[source]#

Placeholder docstring

class sagemaker.core.parameter.ParameterRange(min_value: int | float | PipelineVariable, max_value: int | float | PipelineVariable, scaling_type: str | PipelineVariable = 'Auto')[source]#

Bases: object

Base class for representing parameter ranges.

This is used to define what hyperparameters to tune for an Amazon SageMaker hyperparameter tuning job and to verify hyperparameters for Marketplace Algorithms.

as_tuning_range(name)[source]#

Represent the parameter range as a dictionary.

It is suitable for a request to create an Amazon SageMaker hyperparameter tuning job.

Parameters:

name (str) – The name of the hyperparameter.

Returns:

A dictionary that contains the name and values of the hyperparameter.

Return type:

dict[str, str]

classmethod cast_to_type(value)[source]#

Placeholder docstring

is_valid(value)[source]#

Determine if a value is valid within this ParameterRange.

Parameters:

value (float or int) – The value to be verified.

Returns:

True if valid, False otherwise.

Return type:

bool