62c7ab518214286a4721dd7410978effd6d05471,rllib/models/modelv2.py,ModelV2,from_batch,#ModelV2#Any#Any#,232
Before Change
}
if SampleBatch.PREV_ACTIONS in train_batch:
input_dict["prev_actions"] = train_batch[SampleBatch.PREV_ACTIONS]
if SampleBatch.PREV_REWARDS in train_batch:
input_dict["prev_rewards"] = train_batch[SampleBatch.PREV_REWARDS]
states = []
i = 0
while "state_in_{}".format(i) in train_batch:
states.append(train_batch["state_in_{}".format(i)])
After Change
states.append(train_batch["state_in_{}".format(i)])
i += 1
ret = self.__call__(train_batch, states, train_batch.get("seq_lens"))
del train_batch["is_training"]
return ret
def import_from_h5(self, h5_file: str) -> None:
Imports weights from an h5 file.
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances Project Name: ray-project/ray
Commit Name: 62c7ab518214286a4721dd7410978effd6d05471
Time: 2020-11-12
Author: sven@anyscale.io
File Name: rllib/models/modelv2.py
Class Name: ModelV2
Method Name: from_batch
Project Name: microsoft/nni
Commit Name: b7cd20e62f7dfb7b28407c84cd6b48098fddb915
Time: 2019-07-11
Author: Quanlu.Zhang@microsoft.com
File Name: src/sdk/pynni/nni/bohb_advisor/bohb_advisor.py
Class Name: BOHB
Method Name: handle_trial_end
Project Name: allenai/allennlp
Commit Name: 6d480aaeeda0b035e593b15b81c8ea2a49fa342e
Time: 2020-09-10
Author: eladsegal@users.noreply.github.com
File Name: allennlp/common/from_params.py
Class Name:
Method Name: infer_params
Project Name: ray-project/ray
Commit Name: 39755fdb20c294507035b061a3f75d03f18c092c
Time: 2021-01-21
Author: amogkam@users.noreply.github.com
File Name: python/ray/serve/backend_state.py
Class Name: BackendState
Method Name: delete_backend