b53729be002d8abca55a5b213afcffce052e3645,ml/rl/test/gym/open_ai_gym_environment.py,OpenAIGymEnvironment,policy,#OpenAIGymEnvironment#Any#Any#Any#,107
Before Change
else:
// Convert next_state to a list[dict[int,float]]
next_state_dict = [{}]
for i in range(next_state.shape[1]):
next_state_dict[0][i] = next_state[0][i]
action_score_dict = predictor.predict(next_state_dict)[0]
best_action = None
best_score = None
for action_name, action_score in action_score_dict.items():
After Change
// For DiscreteActionPredictors use the output policy directly
if isinstance(predictor, DiscreteActionPredictor):
action_str = predictor.discrete_action_policy(next_state_dict)[1]
action_idx = self.actions.index(action_str.decode("utf-8"))
else:
action_score_dict = predictor.predict(next_state_dict)[0]
best_action = None
best_score = None
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: facebookresearch/Horizon
Commit Name: b53729be002d8abca55a5b213afcffce052e3645
Time: 2018-03-16
Author: edoardoc@fb.com
File Name: ml/rl/test/gym/open_ai_gym_environment.py
Class Name: OpenAIGymEnvironment
Method Name: policy
Project Name: huyingxi/Synonyms
Commit Name: caf046f34fbde018e95c2b392401730be67e46f5
Time: 2020-09-24
Author: hain@chatopera.com
File Name: synonyms/jieba/analyse/tfidf.py
Class Name: IDFLoader
Method Name: set_new_path
Project Name: stratosphereips/StratosphereLinuxIPS
Commit Name: 667749af7f4fdfca641ce16e0c324e9cd912c87c
Time: 2018-12-18
Author: eldraco@gmail.com
File Name: logsProcess.py
Class Name: LogsProcess
Method Name: process_global_data