isl-org / OpenBot

OpenBot leverages smartphones as brains for low-cost robots. We have designed a small electric vehicle that costs about $50 and serves as a robot body. Our software stack for Android smartphones supports advanced robotics workloads such as person following and real-time autonomous navigation.
https://www.openbot.org
MIT License
2.82k stars 529 forks source link

Error when training model #399

Closed M-S-10 closed 7 months ago

M-S-10 commented 7 months ago

Describe the bug Failing to convert data to tfrecord

To Reproduce Steps to reproduce the behavior:

  1. Uploaded the sessions
  2. Divided into training and testing
  3. Started model training

Expected behavior Initialization of model training

Screenshots Screenshot 2024-02-29 125843 Screenshot 2024-02-29 130052

Desktop (please complete the following information):

Additional context conda_output_log.txt

Oops! Image D:/T-Works cannot be found. TFRecord file created successfully. broadcast message Loading data from tfrecord... Number of training instances: 0 Number of test instances: 0 broadcast failed Exception in callback _chain_future.._set_state(<Future pendi...tures.py:384]>, <Future at 0x...StopIteration>) at D:\mssha\Apps\Anaconda\envs\openbot\lib\asyncio\futures.py:378 handle: <Handle _chain_future.._set_state(<Future pendi...tures.py:384]>, <Future at 0x...StopIteration>) at D:\mssha\Apps\Anaconda\envs\openbot\lib\asyncio\futures.py:378> Traceback (most recent call last): File "D:\mssha\Apps\Anaconda\envs\openbot\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) File "D:\mssha\Apps\Anaconda\envs\openbot\lib\asyncio\futures.py", line 380, in _set_state _copy_future_state(other, future) File "D:\mssha\Apps\Anaconda\envs\openbot\lib\asyncio\futures.py", line 356, in _copy_future_state dest.set_exception(_convert_future_exc(exception)) TypeError: StopIteration interacts badly with generators and cannot be raised into a Future

M-S-10 commented 7 months ago

Running in C Drive now. TF Record files are getting created but another error at the next step.

M-S-10 commented 7 months ago

TFRecord file created successfully. broadcast message Loading data from tfrecord... Image shape: (96, 256, 3) Command: 0.0 Label: [0.23529412 0.23529412] Number of training instances: 28238 Number of test instances: 8671 broadcast preview None broadcast failed [Errno 2] No such file or directory: 'C:\Users\mssha\OpenBot\policy\models\openbot_cil_mobile_lr0.0003_bz128_bn\model.png' Future exception was never retrieved future: <Future finished exception=FileNotFoundError(2, 'No such file or directory')> Traceback (most recent call last): File "D:\Anaconda\envs\openbot\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "C:\Users\mssha\OpenBot\policy\openbot\server\api.py", line 211, in train raise e File "C:\Users\mssha\OpenBot\policy\openbot\server\api.py", line 205, in train tr = start_train(params, my_callback) File "C:\Users\mssha\OpenBot\policy\openbot\train.py", line 624, in start_train do_training(tr, callback, verbose) File "C:\Users\mssha\OpenBot\policy\openbot\train.py", line 437, in do_training tf.keras.utils.plot_model(model, to_file=dot_img_file, show_shapes=True) File "D:\Anaconda\envs\openbot\lib\site-packages\keras\utils\vis_utils.py", line 440, in plot_model dot.write(to_file, format=extension) File "D:\Anaconda\envs\openbot\lib\site-packages\pydot\core.py", line 1663, in write with io.open(path, mode="wb") as f: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\mssha\OpenBot\policy\models\openbot_cil_mobile_lr0.0003_bz128_bn\model.png' Unregistering... unhandled exception during asyncio.run() shutdown task: <Task finished name='Task-3' coro=<_run_app() done, defined at D:\Anaconda\envs\openbot\lib\site-packages\aiohttp\web.py:287> exception=NameError("name 'info' is not defined")> Traceback (most recent call last): File "D:\Anaconda\envs\openbot\lib\site-packages\aiohttp\web.py", line 429, in _run_app await asyncio.sleep(delay) File "D:\Anaconda\envs\openbot\lib\asyncio\tasks.py", line 652, in sleep return await future asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Anaconda\envs\openbot\lib\site-packages\aiohttp\web.py", line 431, in _run_app await runner.cleanup() File "D:\Anaconda\envs\openbot\lib\site-packages\aiohttp\web_runner.py", line 293, in cleanup await site.stop() File "D:\Anaconda\envs\openbot\lib\site-packages\aiohttp\web_runner.py", line 76, in stop await self._runner.shutdown() File "D:\Anaconda\envs\openbot\lib\site-packages\aiohttp\web_runner.py", line 369, in shutdown await self._app.shutdown() File "D:\Anaconda\envs\openbot\lib\site-packages\aiohttp\web_app.py", line 423, in shutdown await self.on_shutdown.send(self) File "D:\Anaconda\envs\openbot\lib\site-packages\aiohttp\signals.py", line 34, in send await receiver(*args, **kwargs) # type: ignore File "C:\Users\mssha\OpenBot\policy\openbot\server\zeroconf.py", line 70, in on_shutdown await do_close(zc) File "C:\Users\mssha\OpenBot\policy\openbot\server\zeroconf.py", line 64, in do_close await zc.unregister_service(info) NameError: name 'info' is not defined