1775e89f262111791fabfd40f80a24f74738fe54,rllib/policy/policy.py,,clip_action,#Any#Any#,388

Before Change


    

    if isinstance(space, gym.spaces.Box):
        return np.clip(action, space.low, space.high)
    elif isinstance(space, gym.spaces.Tuple):
        if type(action) not in (tuple, list):
            raise ValueError("Expected tuple space for actions {}: {}".format(
                action, space))

After Change


            a = np.clip(a, s.low, s.high)
        return a

    return tree.map_structure(map_, action, action_space)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: ray-project/ray
Commit Name: 1775e89f262111791fabfd40f80a24f74738fe54
Time: 2020-04-28
Author: sven@anyscale.io
File Name: rllib/policy/policy.py
Class Name:
Method Name: clip_action


Project Name: asyml/texar
Commit Name: 6426fc937946517f208e0b8525d7f85afb952cef
Time: 2018-01-26
Author: zhiting.hu@petuum.com
File Name: texar/modules/decoders/rnn_decoders.py
Class Name: AttentionRNNDecoder
Method Name: output_dtype


Project Name: asyml/texar
Commit Name: b41104d53d3fe1979029a4edea5dc9943dd4037a
Time: 2017-12-07
Author: zhiting.hu@petuum.com
File Name: texar/modules/decoders/rnn_decoders.py
Class Name: BasicRNNDecoder
Method Name: output_dtype