fb5d49ee143bf28d78968f5065f8e2f449b3c55b,ml/rl/training/rl_predictor.py,RLPredictor,predict,#RLPredictor#Any#Any#,113

Before Change


            "input/float_features.lengths",
            np.array([len(e) for e in float_state_features], dtype=np.int32),
        )
        workspace.FeedBlob(
            "input/float_features.keys",
            np.array(
                [list(e.keys()) for e in float_state_features], dtype=np.int64
            ).flatten(),
        )
        workspace.FeedBlob(
            "input/float_features.values",
            np.array(
                [list(e.values()) for e in float_state_features], dtype=np.float32
            ).flatten(),
        )

        if int_state_features is not None:
            workspace.FeedBlob(
                "input/int_features.lengths",
                np.array([len(e) for e in int_state_features], dtype=np.int32),
            )
            workspace.FeedBlob(
                "input/int_features.keys",
                np.array(
                    [list(e.keys()) for e in int_state_features], dtype=np.int64
                ).flatten(),
            )
            workspace.FeedBlob(
                "input/int_features.values",
                np.array(
                    [list(e.values()) for e in int_state_features], dtype=np.int32
                ).flatten(),
            )

After Change


                "input/int_features.lengths",
                np.array([len(e) for e in int_state_features], dtype=np.int32),
            )
            int_state_keys = []
            int_state_values = []
            for example in int_state_features:
                for k, v in example.items():
                    int_state_keys.append(k)
                    int_state_values.append(v)
            workspace.FeedBlob(
                "input/int_features.keys",
                np.array(int_state_keys, dtype=np.int64).flatten(),
            )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 38

Instances


Project Name: facebookresearch/Horizon
Commit Name: fb5d49ee143bf28d78968f5065f8e2f449b3c55b
Time: 2018-07-14
Author: jjg@fb.com
File Name: ml/rl/training/rl_predictor.py
Class Name: RLPredictor
Method Name: predict


Project Name: facebookresearch/Horizon
Commit Name: fb5d49ee143bf28d78968f5065f8e2f449b3c55b
Time: 2018-07-14
Author: jjg@fb.com
File Name: ml/rl/training/rl_predictor.py
Class Name: RLPredictor
Method Name: predict


Project Name: facebookresearch/Horizon
Commit Name: fb5d49ee143bf28d78968f5065f8e2f449b3c55b
Time: 2018-07-14
Author: jjg@fb.com
File Name: ml/rl/training/rl_predictor.py
Class Name: RLPredictor
Method Name: policy


Project Name: facebookresearch/Horizon
Commit Name: 1942c142968a78afcfc86dcfd660949cd8550b5c
Time: 2018-07-19
Author: jjg@fb.com
File Name: ml/rl/training/rl_predictor_pytorch.py
Class Name: RLPredictor
Method Name: predict