LIDAR Example code #97
-
Hello, I was wondering how we could utilize the LIDAR RTGym environment in code. The example code in the competition folder only shows how we can interact and use the raw images. But we assume LIDAR is much quicker in training? So we'd like to use the LIDAR as well and compare performance. Is there some example code to show how to use this LIDAR environment in code for agent training? Also, a ssecond part. I am saving my model by setting the parameter in the config "SAVE_MODEL_EVERY" to number I want. Now I have a .tcpt file and .tmod but I don't see 2 things
But doing this gives the following error: I saw there was a pickled reward function from the example, do I need that as well? if so, how do I save that to use it with my weights to perform inference with later. Thanks in advance for any advice! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi, If you set the "ENV" entry in If you want to code your own LIDAR environment, the code for the default LIDAR environment is here. If you want to test one of the models saved in the history, you need to simply rename this model (a .tmod file) by removing the |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the reply! Could you elaborate more on the second part, using your own trained model? What I do now is use the .tmod file in the TmrlData/weights folder that is saved (as in my own model, not the pretrained model that is provided with TMRL). I rename the "RUN_NAME" to my own trained model name (for example, it's called "test_123.tmod", so the "RUN_NAME" will be "test_123" in the config.json file) and run the command you suggested "py -m tmrl --test" but this will give the above stacktrace back. Also, how can I continue the training process with the .tcpt file in the TmrlData/Checkpoint folder? Thanks again for your reply |
Beta Was this translation helpful? Give feedback.
Oh I see, sorry I didn't get that!
The competition script saves stuff in .json format only because we don't want people to submit pickle files to the competition for security reasons.
If you are training something locally, you can use the default serializer instead, it should solve your issue.
Your issue comes from the fact that
tmrl --test
uses the default (pickle) deserializer. If you want to test your trained policy serialized in .json, you can use the competition evaluation script