phlower.settings.GroupModuleSetting

class phlower.settings.GroupModuleSetting(*, name, inputs, outputs, modules, destinations=None, nn_type='GROUP', no_grad=False, support_names=None)[source]

Bases: IModuleSetting, IReadOnlyReferenceGroupSetting, BaseModel

Methods

find_module(name)

get_destinations()

get_input_keys()

get_name()

get_output_info()

get_output_keys()

resolve(*resolved_outputs[, is_first])

search_module_setting(name)

validate_annotate_modules(vals)

Attributes

model_computed_fields

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra

Get extra fields set during validation.

model_fields

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

name

name of group

inputs

definition of input varaibles

outputs

definition of output varaibles

modules

modules which belongs to this group

destinations

name of destination modules.

nn_type

name of neural network type.

no_grad

A Flag not to calculate gradient.

support_names

Parameters:
  • name (str)

  • inputs (list[GroupIOSetting])

  • outputs (list[GroupIOSetting])

  • modules (list[ModuleSetting | GroupModuleSetting])

  • destinations (list[str])

  • nn_type (Literal['GROUP'])

  • no_grad (bool)

  • support_names (list[str])

destinations: list[str]

name of destination modules.

inputs: list[GroupIOSetting]

definition of input varaibles

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'destinations': FieldInfo(annotation=list[str], required=False, default_factory=<lambda>), 'inputs': FieldInfo(annotation=list[GroupIOSetting], required=True), 'modules': FieldInfo(annotation=list[Union[ModuleSetting, GroupModuleSetting]], required=True), 'name': FieldInfo(annotation=str, required=True), 'nn_type': FieldInfo(annotation=Literal['GROUP'], required=False, default='GROUP'), 'no_grad': FieldInfo(annotation=bool, required=False, default=False), 'outputs': FieldInfo(annotation=list[GroupIOSetting], required=True), 'support_names': FieldInfo(annotation=list[str], required=False, default_factory=<lambda>)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

modules: list[ModuleSetting | GroupModuleSetting]

modules which belongs to this group

name: str

name of group

nn_type: Literal['GROUP']

name of neural network type. Fixed to “GROUP”

no_grad: bool

A Flag not to calculate gradient. Defauls to False.

outputs: list[GroupIOSetting]

definition of output varaibles