fix training via web interface
needs to overwrite policy type since it's not integrated with GUI and returns `None`
@@ -191,6 +191,7 @@ async def start(params):
hyper_params = Hyperparameters()
for p in params:
setattr(hyper_params, p, params[p])
+ setattr(hyper_params, 'POLICY', 'autopilot')
print(hyper_params.__dict__)
loop.run_in_executor(None, train, hyper_params, broadcast, event_cancelled)
return True
@@ -200,7 +201,7 @@ def train(params, broadcast, cancelled):
try:
broadcast("started", params.__dict__)
my_callback = MyCallback(broadcast, cancelled, True)
- create_tfrecord(my_callback)
+ create_tfrecord(my_callback, params.POLICY)
tr = start_train(params, my_callback)
broadcast("done", {"model": tr.model_name})
except CancelledException:
