reagent.net_builder package

Subpackages

Submodules

reagent.net_builder.categorical_dqn_net_builder module

class reagent.net_builder.categorical_dqn_net_builder.CategoricalDQNNetBuilder

Bases: object

Base class for categorical DQN net builder.

abstract build_q_network(state_normalization_data: reagent.core.parameters.NormalizationData, output_dim: int, num_atoms: int, qmin: int, qmax: int) reagent.models.base.ModelBase
build_serving_module(q_network: reagent.models.base.ModelBase, state_normalization_data: reagent.core.parameters.NormalizationData, action_names: List[str], state_feature_config: reagent.core.types.ModelFeatureConfig) torch.nn.modules.module.Module

Returns a TorchScript predictor module

reagent.net_builder.continuous_actor_net_builder module

class reagent.net_builder.continuous_actor_net_builder.ContinuousActorNetBuilder

Bases: object

Base class for continuous actor net builder.

abstract build_actor(state_feature_config: reagent.core.types.ModelFeatureConfig, state_normalization_data: reagent.core.parameters.NormalizationData, action_normalization_data: reagent.core.parameters.NormalizationData) reagent.models.base.ModelBase
build_ranking_serving_module(actor: reagent.models.base.ModelBase, state_normalization_data: reagent.core.parameters.NormalizationData, candidate_normalization_data: reagent.core.parameters.NormalizationData, num_candidates: int, action_normalization_data: reagent.core.parameters.NormalizationData) torch.nn.modules.module.Module
build_serving_module(actor: reagent.models.base.ModelBase, state_feature_config: reagent.core.types.ModelFeatureConfig, state_normalization_data: reagent.core.parameters.NormalizationData, action_normalization_data: reagent.core.parameters.NormalizationData, serve_mean_policy: bool = False) torch.nn.modules.module.Module

Returns a TorchScript predictor module

abstract property default_action_preprocessing: str

reagent.net_builder.discrete_actor_net_builder module

class reagent.net_builder.discrete_actor_net_builder.DiscreteActorNetBuilder

Bases: object

Base class for discrete actor net builder.

abstract build_actor(state_normalization_data: reagent.core.parameters.NormalizationData, num_actions: int) reagent.models.base.ModelBase
build_serving_module(actor: reagent.models.base.ModelBase, state_feature_config: reagent.core.types.ModelFeatureConfig, state_normalization_data: reagent.core.parameters.NormalizationData, action_feature_ids: List[int]) torch.nn.modules.module.Module

Returns a TorchScript predictor module

reagent.net_builder.discrete_dqn_net_builder module

class reagent.net_builder.discrete_dqn_net_builder.DiscreteDQNNetBuilder

Bases: object

Base class for discrete DQN net builder.

build_binary_difference_scorer(q_network: reagent.models.base.ModelBase, state_normalization_data: reagent.core.parameters.NormalizationData, action_names: List[str], state_feature_config: reagent.core.types.ModelFeatureConfig) torch.nn.modules.module.Module

Returns softmax(1) - softmax(0)

abstract build_q_network(state_feature_config: reagent.core.types.ModelFeatureConfig, state_normalization_data: reagent.core.parameters.NormalizationData, output_dim: int) reagent.models.base.ModelBase
build_serving_module(q_network: reagent.models.base.ModelBase, state_normalization_data: reagent.core.parameters.NormalizationData, action_names: List[str], state_feature_config: reagent.core.types.ModelFeatureConfig, predictor_wrapper_type=None) torch.nn.modules.module.Module

Returns a TorchScript predictor module

reagent.net_builder.parametric_dqn_net_builder module

class reagent.net_builder.parametric_dqn_net_builder.ParametricDQNNetBuilder

Bases: object

Base class for parametric DQN net builder.

abstract build_q_network(state_normalization_data: reagent.core.parameters.NormalizationData, action_normalization_data: reagent.core.parameters.NormalizationData, output_dim: int = 1) reagent.models.base.ModelBase
build_serving_module(q_network: reagent.models.base.ModelBase, state_normalization_data: reagent.core.parameters.NormalizationData, action_normalization_data: reagent.core.parameters.NormalizationData) torch.nn.modules.module.Module

Returns a TorchScript predictor module

reagent.net_builder.quantile_dqn_net_builder module

class reagent.net_builder.quantile_dqn_net_builder.QRDQNNetBuilder

Bases: object

Base class for QRDQN net builder.

abstract build_q_network(state_normalization_data: reagent.core.parameters.NormalizationData, output_dim: int, num_atoms: int) reagent.models.base.ModelBase
build_serving_module(q_network: reagent.models.base.ModelBase, state_normalization_data: reagent.core.parameters.NormalizationData, action_names: List[str], state_feature_config: reagent.core.types.ModelFeatureConfig) torch.nn.modules.module.Module

Returns a TorchScript predictor module

reagent.net_builder.slate_ranking_net_builder module

class reagent.net_builder.slate_ranking_net_builder.SlateRankingNetBuilder

Bases: object

Base class for slate ranking network builder.

abstract build_slate_ranking_network(state_dim, candidate_dim, candidate_size, slate_size) torch.nn.modules.module.Module

reagent.net_builder.slate_reward_net_builder module

class reagent.net_builder.slate_reward_net_builder.SlateRewardNetBuilder

Bases: object

Base class for slate reward network builder.

abstract build_slate_reward_network(state_dim, candidate_dim, candidate_size, slate_size) torch.nn.modules.module.Module
abstract property expect_slate_wise_reward: bool

reagent.net_builder.synthetic_reward_net_builder module

class reagent.net_builder.synthetic_reward_net_builder.SyntheticRewardNetBuilder

Bases: object

Base class for Synthetic Reward net builder.

build_serving_module(seq_len: int, synthetic_reward_network: reagent.models.base.ModelBase, state_normalization_data: reagent.core.parameters.NormalizationData, action_normalization_data: Optional[reagent.core.parameters.NormalizationData] = None, discrete_action_names: Optional[List[str]] = None) torch.nn.modules.module.Module

Returns a TorchScript predictor module

abstract build_synthetic_reward_network(state_normalization_data: reagent.core.parameters.NormalizationData, action_normalization_data: Optional[reagent.core.parameters.NormalizationData] = None, discrete_action_names: Optional[List[str]] = None) reagent.models.base.ModelBase

reagent.net_builder.unions module

class reagent.net_builder.unions.CategoricalDQNNetBuilder__Union(Categorical: Optional[reagent.net_builder.categorical_dqn.categorical.Categorical] = None)

Bases: reagent.core.tagged_union.TaggedUnion

Categorical: Optional[reagent.net_builder.categorical_dqn.categorical.Categorical] = None
class reagent.net_builder.unions.ContinuousActorNetBuilder__Union(FullyConnected: Optional[reagent.net_builder.continuous_actor.fully_connected.FullyConnected] = None, DirichletFullyConnected: Optional[reagent.net_builder.continuous_actor.dirichlet_fully_connected.DirichletFullyConnected] = None, GaussianFullyConnected: Optional[reagent.net_builder.continuous_actor.gaussian_fully_connected.GaussianFullyConnected] = None)

Bases: reagent.core.tagged_union.TaggedUnion

DirichletFullyConnected: Optional[reagent.net_builder.continuous_actor.dirichlet_fully_connected.DirichletFullyConnected] = None
FullyConnected: Optional[reagent.net_builder.continuous_actor.fully_connected.FullyConnected] = None
GaussianFullyConnected: Optional[reagent.net_builder.continuous_actor.gaussian_fully_connected.GaussianFullyConnected] = None
class reagent.net_builder.unions.DiscreteActorNetBuilder__Union(FullyConnected: Optional[reagent.net_builder.discrete_actor.fully_connected.FullyConnected] = None)

Bases: reagent.core.tagged_union.TaggedUnion

FullyConnected: Optional[reagent.net_builder.discrete_actor.fully_connected.FullyConnected] = None
class reagent.net_builder.unions.DiscreteDQNNetBuilder__Union(Dueling: Optional[reagent.net_builder.discrete_dqn.dueling.Dueling] = None, FullyConnected: Optional[reagent.net_builder.discrete_dqn.fully_connected.FullyConnected] = None, FullyConnectedWithEmbedding: Optional[reagent.net_builder.discrete_dqn.fully_connected_with_embedding.FullyConnectedWithEmbedding] = None)

Bases: reagent.core.tagged_union.TaggedUnion

Dueling: Optional[reagent.net_builder.discrete_dqn.dueling.Dueling] = None
FullyConnected: Optional[reagent.net_builder.discrete_dqn.fully_connected.FullyConnected] = None
FullyConnectedWithEmbedding: Optional[reagent.net_builder.discrete_dqn.fully_connected_with_embedding.FullyConnectedWithEmbedding] = None
class reagent.net_builder.unions.ParametricDQNNetBuilder__Union(FullyConnected: Optional[reagent.net_builder.parametric_dqn.fully_connected.FullyConnected] = None)

Bases: reagent.core.tagged_union.TaggedUnion

FullyConnected: Optional[reagent.net_builder.parametric_dqn.fully_connected.FullyConnected] = None
class reagent.net_builder.unions.QRDQNNetBuilder__Union(Quantile: Optional[reagent.net_builder.quantile_dqn.quantile.Quantile] = None, DuelingQuantile: Optional[reagent.net_builder.quantile_dqn.dueling_quantile.DuelingQuantile] = None)

Bases: reagent.core.tagged_union.TaggedUnion

DuelingQuantile: Optional[reagent.net_builder.quantile_dqn.dueling_quantile.DuelingQuantile] = None
Quantile: Optional[reagent.net_builder.quantile_dqn.quantile.Quantile] = None
class reagent.net_builder.unions.SyntheticRewardNetBuilder__Union(SingleStepSyntheticReward: Optional[reagent.net_builder.synthetic_reward.single_step_synthetic_reward.SingleStepSyntheticReward] = None, NGramSyntheticReward: Optional[reagent.net_builder.synthetic_reward.ngram_synthetic_reward.NGramSyntheticReward] = None, NGramConvNetSyntheticReward: Optional[reagent.net_builder.synthetic_reward.ngram_synthetic_reward.NGramConvNetSyntheticReward] = None, SequenceSyntheticReward: Optional[reagent.net_builder.synthetic_reward.sequence_synthetic_reward.SequenceSyntheticReward] = None, TransformerSyntheticReward: Optional[reagent.net_builder.synthetic_reward.transformer_synthetic_reward.TransformerSyntheticReward] = None)

Bases: reagent.core.tagged_union.TaggedUnion

NGramConvNetSyntheticReward: Optional[reagent.net_builder.synthetic_reward.ngram_synthetic_reward.NGramConvNetSyntheticReward] = None
NGramSyntheticReward: Optional[reagent.net_builder.synthetic_reward.ngram_synthetic_reward.NGramSyntheticReward] = None
SequenceSyntheticReward: Optional[reagent.net_builder.synthetic_reward.sequence_synthetic_reward.SequenceSyntheticReward] = None
SingleStepSyntheticReward: Optional[reagent.net_builder.synthetic_reward.single_step_synthetic_reward.SingleStepSyntheticReward] = None
TransformerSyntheticReward: Optional[reagent.net_builder.synthetic_reward.transformer_synthetic_reward.TransformerSyntheticReward] = None
class reagent.net_builder.unions.ValueNetBuilder__Union(FullyConnected: Optional[reagent.net_builder.value.fully_connected.FullyConnected] = None, Seq2RewardNetBuilder: Optional[reagent.net_builder.value.seq2reward_rnn.Seq2RewardNetBuilder] = None)

Bases: reagent.core.tagged_union.TaggedUnion

FullyConnected: Optional[reagent.net_builder.value.fully_connected.FullyConnected] = None
Seq2RewardNetBuilder: Optional[reagent.net_builder.value.seq2reward_rnn.Seq2RewardNetBuilder] = None

reagent.net_builder.value_net_builder module

class reagent.net_builder.value_net_builder.ValueNetBuilder

Bases: object

Base class for value-network builder.

abstract build_value_network(state_normalization_data: reagent.core.parameters.NormalizationData) torch.nn.modules.module.Module

Module contents