3271313bc68d99a52a0a768a81d73b610d792906,reagent/test/evaluation/test_evaluation_data_page.py,TestEvaluationDataPage,test_seq2slate_eval_data_page,#TestEvaluationDataPage#,86

Before Change


            tgt_out_idx.flatten() - 2,
        ].reshape(batch_size, tgt_seq_len, candidate_dim)

        ptb = rlt.PreprocessedTrainingBatch(
            training_input=rlt.PreprocessedRankingInput(
                state=rlt.FeatureData(float_features=torch.eye(state_dim)),
                src_seq=rlt.FeatureData(float_features=src_seq),
                tgt_out_seq=rlt.FeatureData(float_features=tgt_out_seq),
                src_src_mask=torch.ones(batch_size, src_seq_len, src_seq_len),
                tgt_out_idx=tgt_out_idx,
                tgt_out_probs=torch.tensor([0.2, 0.5, 0.4]),
                slate_reward=torch.tensor([4.0, 5.0, 7.0]),
            ),
            extras=rlt.ExtraData(
                sequence_number=torch.tensor([0, 0, 0]),
                mdp_id=np.array(["0", "1", "2"]),
            ),
        )

        edp = EvaluationDataPage.create_from_tensors_seq2slate(
            seq2slate_net, reward_net, ptb.training_input, eval_greedy=True
        )

After Change


            tgt_out_idx=tgt_out_idx,
            tgt_out_probs=torch.tensor([0.2, 0.5, 0.4]),
            slate_reward=torch.tensor([4.0, 5.0, 7.0]),
            extras=rlt.ExtraData(
                sequence_number=torch.tensor([0, 0, 0]),
                mdp_id=np.array(["0", "1", "2"]),
            ),
        )

        edp = EvaluationDataPage.create_from_tensors_seq2slate(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: facebookresearch/Horizon
Commit Name: 3271313bc68d99a52a0a768a81d73b610d792906
Time: 2021-01-07
Author: yuanyuanshen@fb.com
File Name: reagent/test/evaluation/test_evaluation_data_page.py
Class Name: TestEvaluationDataPage
Method Name: test_seq2slate_eval_data_page


Project Name: facebookresearch/Horizon
Commit Name: 2fcbd0407c6b9d2402f66aedd3999072f3ae399e
Time: 2020-04-22
Author: kittipat@fb.com
File Name: reagent/training/training_data_page.py
Class Name: TrainingDataPage
Method Name: as_discrete_maxq_training_batch


Project Name: facebookresearch/Horizon
Commit Name: a13c8060b279bd21ebc4f532d64497d897a0e4f7
Time: 2020-04-23
Author: kittipat@fb.com
File Name: reagent/training/training_data_page.py
Class Name: TrainingDataPage
Method Name: as_slate_q_training_batch


Project Name: facebookresearch/Horizon
Commit Name: f2e39855d7dda56b4b31185d4d0dd131f909369b
Time: 2020-05-02
Author: wangkaiwen998@gmail.com
File Name: reagent/training/training_data_page.py
Class Name: TrainingDataPage
Method Name: as_policy_network_training_batch