reagent.model_managers.ranking package

Submodules

reagent.model_managers.ranking.slate_q module

class reagent.model_managers.ranking.slate_q.SlateQ(slate_feature_id: int = 0, slate_score_id: Tuple[int, int] = (0, 0), item_preprocessing_options: Optional[reagent.workflow.types.PreprocessingOptions] = None, state_preprocessing_options: Optional[reagent.workflow.types.PreprocessingOptions] = None, state_float_features: Optional[List[Tuple[int, str]]] = None, item_float_features: Optional[List[Tuple[int, str]]] = None, slate_size: int = -1, num_candidates: int = -1, trainer_param: reagent.training.parameters.SlateQTrainerParameters = <factory>, net_builder: reagent.net_builder.unions.ParametricDQNNetBuilder__Union = <factory>)

Bases: reagent.model_managers.slate_q_base.SlateQBase

build_serving_module(trainer_module: reagent.training.reagent_lightning_module.ReAgentLightningModule, normalization_data_map: Dict[str, reagent.core.parameters.NormalizationData]) torch.nn.modules.module.Module

Optionaly, implement this method if you only have one model for serving

build_trainer(normalization_data_map: Dict[str, reagent.core.parameters.NormalizationData], use_gpu: bool, reward_options: Optional[reagent.workflow.types.RewardOptions] = None) reagent.training.slate_q_trainer.SlateQTrainer

Implement this to build the trainer, given the config

TODO: This function should return ReAgentLightningModule & the dictionary of modules created

net_builder: reagent.net_builder.unions.ParametricDQNNetBuilder__Union
num_candidates: int = -1
slate_size: int = -1
trainer_param: reagent.training.parameters.SlateQTrainerParameters

Module contents

class reagent.model_managers.ranking.SlateQ(slate_feature_id: int = 0, slate_score_id: Tuple[int, int] = (0, 0), item_preprocessing_options: Optional[reagent.workflow.types.PreprocessingOptions] = None, state_preprocessing_options: Optional[reagent.workflow.types.PreprocessingOptions] = None, state_float_features: Optional[List[Tuple[int, str]]] = None, item_float_features: Optional[List[Tuple[int, str]]] = None, slate_size: int = -1, num_candidates: int = -1, trainer_param: reagent.training.parameters.SlateQTrainerParameters = <factory>, net_builder: reagent.net_builder.unions.ParametricDQNNetBuilder__Union = <factory>)

Bases: reagent.model_managers.slate_q_base.SlateQBase

build_serving_module(trainer_module: reagent.training.reagent_lightning_module.ReAgentLightningModule, normalization_data_map: Dict[str, reagent.core.parameters.NormalizationData]) torch.nn.modules.module.Module

Optionaly, implement this method if you only have one model for serving

build_trainer(normalization_data_map: Dict[str, reagent.core.parameters.NormalizationData], use_gpu: bool, reward_options: Optional[reagent.workflow.types.RewardOptions] = None) reagent.training.slate_q_trainer.SlateQTrainer

Implement this to build the trainer, given the config

TODO: This function should return ReAgentLightningModule & the dictionary of modules created

net_builder: reagent.net_builder.unions.ParametricDQNNetBuilder__Union
num_candidates: int = -1
slate_size: int = -1
trainer_param: reagent.training.parameters.SlateQTrainerParameters