525f94ff0bfdb617175791a36f37bdd4ccb808d0,ml/rl/test/preprocessing/test_feature_extractor.py,TestTrainingFeatureExtractor,test_extract_max_q_discrete_action,#TestTrainingFeatureExtractor#,196
Before Change
)
// Setup
ws, net = self.create_ws_and_net(extractor)
input_record = net.input_record() + schema.NewRecord(
net, schema.Struct(("reward", schema.Scalar()))
)
self.setup_state_features(ws, input_record.state_features)
self.setup_next_state_features(ws, input_record.next_state_features)
action = self.setup_action(ws, input_record.action)
possible_next_actions = self.setup_possible_next_actions(
After Change
res = extractor.extract(ws, input_record, net.output_record())
o = res.training_input
npt.assert_array_equal(reward.reshape(-1, 1), o.reward.numpy())
npt.assert_array_equal(
extra_data.episode_value.reshape(-1, 1), res.extras.episode_value.numpy()
)
npt.assert_array_equal(
extra_data.action_probability.reshape(-1, 1),
res.extras.action_probability.numpy(),
)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances
Project Name: facebookresearch/Horizon
Commit Name: 525f94ff0bfdb617175791a36f37bdd4ccb808d0
Time: 2018-10-24
Author: kittipat@fb.com
File Name: ml/rl/test/preprocessing/test_feature_extractor.py
Class Name: TestTrainingFeatureExtractor
Method Name: test_extract_max_q_discrete_action
Project Name: facebookresearch/Horizon
Commit Name: 525f94ff0bfdb617175791a36f37bdd4ccb808d0
Time: 2018-10-24
Author: kittipat@fb.com
File Name: ml/rl/test/preprocessing/test_feature_extractor.py
Class Name: TestTrainingFeatureExtractor
Method Name: test_extract_sarsa_parametric_action
Project Name: facebookresearch/Horizon
Commit Name: 525f94ff0bfdb617175791a36f37bdd4ccb808d0
Time: 2018-10-24
Author: kittipat@fb.com
File Name: ml/rl/test/preprocessing/test_feature_extractor.py
Class Name: TestTrainingFeatureExtractor
Method Name: test_extract_sarsa_discrete_action
Project Name: facebookresearch/Horizon
Commit Name: 525f94ff0bfdb617175791a36f37bdd4ccb808d0
Time: 2018-10-24
Author: kittipat@fb.com
File Name: ml/rl/test/preprocessing/test_feature_extractor.py
Class Name: TestTrainingFeatureExtractor
Method Name: test_extract_max_q_parametric_action