File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
ml-agents/mlagents/trainers Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -115,8 +115,6 @@ def load_demonstration(
115115 :return: BrainParameter and list of AgentInfoActionPairProto containing demonstration data.
116116 """
117117
118- # First 32 bytes of file dedicated to meta-data.
119- INITIAL_POS = 33
120118 file_paths = get_demo_files (file_path )
121119
122120 brain_params = None
@@ -134,12 +132,13 @@ def load_demonstration(
134132 meta_data_proto = DemonstrationMetaProto ()
135133 meta_data_proto .ParseFromString (data [pos : pos + next_pos ])
136134 total_expected += meta_data_proto .number_steps
137- pos = INITIAL_POS
138- if obs_decoded == 1 :
135+ # first 32 bytes of file dedicated to meta-data.
136+ pos = 33
137+ elif obs_decoded == 1 :
139138 brain_param_proto = BrainParametersProto ()
140139 brain_param_proto .ParseFromString (data [pos : pos + next_pos ])
141140 pos += next_pos
142- if obs_decoded > 1 :
141+ else :
143142 agent_info_action = AgentInfoActionPairProto ()
144143 agent_info_action .ParseFromString (data [pos : pos + next_pos ])
145144 if brain_params is None :
@@ -148,6 +147,7 @@ def load_demonstration(
148147 )
149148 info_action_pairs .append (agent_info_action )
150149 if len (info_action_pairs ) == total_expected :
150+ breakpoint ()
151151 break
152152 pos += next_pos
153153 obs_decoded += 1
You can’t perform that action at this time.
0 commit comments