ObjectSpec 类

用于序列化和反序列化的元对象。

继承
builtins.object
ObjectSpec

构造函数

ObjectSpec(spec_class, module, class_name, *param_args, **param_kwargs)

参数

spec_class
module
class_name

方法

from_dict

从字典反序列化 ObjectSpec。

instantiate

使用其他参数创建新对象。

prepare_kwargs

设置 self.prepared_kwargs,它是 param_kwargs 的一个已修改副本。

supports_constrained_fit

检查 ObjectSpec 是否支持约束拟合。

在给定时间约束对 ObjectSpec 父类返回 false 的情况下,返回管道步骤是否可以停止

to_dict

将 ObjectSpec 序列化到字典。

from_dict

从字典反序列化 ObjectSpec。

from_dict(d: Dict[str, Any]) -> azureml.automl.runtime.shared.pipeline_spec.ObjectSpec

参数

cls
必需

要创建的对象的类

d
必需

要反序列化的字典

返回

字典的 ObjectSpec

instantiate

使用其他参数创建新对象。

instantiate(problem_info, random_state=None, num_threads=1, dataset_metadata=None)

参数

problem_info
必需
random_state
默认值: None
num_threads
默认值: 1
dataset_metadata
默认值: None

返回

来自模块的新对象和来自构造函数的类

例外

ConfigException

prepare_kwargs

设置 self.prepared_kwargs,它是 param_kwargs 的一个已修改副本。

prepare_kwargs(cls, problem_info, random_state=None, num_threads=1, dataset_metadata=None)

参数

cls
必需
problem_info
必需
random_state
默认值: None
num_threads
默认值: 1
dataset_metadata
默认值: None

supports_constrained_fit

检查 ObjectSpec 是否支持约束拟合。

在给定时间约束对 ObjectSpec 父类返回 false 的情况下,返回管道步骤是否可以停止

supports_constrained_fit()

to_dict

将 ObjectSpec 序列化到字典。

to_dict()

返回

ObjectSpec 特性的字典