Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run pylot in the base system fails #251

Open
wutianze opened this issue Apr 24, 2022 · 8 comments
Open

Run pylot in the base system fails #251

wutianze opened this issue Apr 24, 2022 · 8 comments

Comments

@wutianze
Copy link

wutianze commented Apr 24, 2022

Follow the installation guide in https://pylot.readthedocs.io/en/latest/manual_installation.html. I try to run pylot in my base system. The simulation is started successfully, howerver, when running pylot using python3 pylot.py --flagfile=configs/detection.conf, error shows AttributeError: module 'erdos' has no attribute 'Operator'.
I think maybe the erdos version is not correct(pip install will install version erdos 0.4.0), so I changed the setup.sh (force using erdos 0.3.1), and run again. The Operator error didn't show, but I encounter new errors:
Traceback (most recent call last): File "/home/sauron/.local/lib/python3.8/site-packages/erdos/streams.py", line 114, in internal_callback callback(msg, *write_streams) File "/home/sauron/.local/lib/python3.8/site-packages/erdos/__init__.py", line 294, in wrapper return func(*args, **kwargs) File "/home/sauron/pylot/pylot/perception/detection/detection_operator.py", line 110, in on_msg_camera_stream num_detections, res_boxes, res_scores, res_classes = self.__run_model( File "/home/sauron/pylot/pylot/perception/detection/detection_operator.py", line 161, in __run_model infer = self._model.signatures['serving_default'] AttributeError: 'DetectionOperator' object has no attribute '_model'
Thank you for your help

@pschafhalter
Copy link
Member

Could you check that the detection operator finishes initializing before the callback is invoked? One way to do this is by adding a print statement after the following lines to ensure that the model is loaded:

# Load the model from the saved_model format file.
self._model = tf.saved_model.load(model_path)

@JackWetherell
Copy link

JackWetherell commented Apr 26, 2022

@wutianze I also have the issue, and I am using the pre-built docker. Can you please describe the installation is not complete a little more? What additional steps did you take to fix this?

@pschafhalter Is it possible the models aren't included in the docker image?

@wutianze
Copy link
Author

@wutianze I also have the issue, and I am using the pre-built docker. Can you please describe the installation is not complete a little more? What additional steps did you take to fix this?

@pschafhalter Is it possible the models aren't included in the docker image?

I tried building pylot in my base system and the build process is not finished correctly because 30 series GPU doesn't support CUDA 10(you can check this issue: #250).
However, since you are using the docker container, it should work without error
I will reopen this issue for those who meet the same problem.

@wutianze wutianze reopened this Apr 26, 2022
@JackWetherell
Copy link

@wutianze thank you.

I have determined why I was getting this issue for my particular use case in the docker container.

I was using the config: pylot/simulation/challenge/challenge.conf, and this contains some out-of-date paths for models (possibly the paths are wrong in some other configs too?)

An example path is: --obstacle_detection_model_paths=/workspace/team_code/dependencies/models/obstacle_detection/faster-rcnn/frozen_inference_graph.pb

And changing this to /home/erdos/workspace/pylot/dependencies/models/obstacle_detection/faster-rcnn/frozen_inference_graph.pb fixed the issue.

@pschafhalter Is this worth me fixing and raising a PR, also making the error a little more clear that it is the filepath that is wrong, as the current error does not indicate this.

@pschafhalter
Copy link
Member

@JackWetherell challenge.conf is designed for the CARLA Challenge docker container which has a different directory layout. A PR that improves the error messages and comments challenge.conf to clarify this would be very welcome, but I wouldn't update the paths.

@wutianze
Copy link
Author

I think I found the main problem. Erdos 0.4.0 changed its API and is incompatible with Pylot.

@jingzhengli
Copy link

I think I found the main problem. Erdos 0.4.0 changed its API and is incompatible with Pylot.

How to solve this error. I met the same error

@pschafhalter
Copy link
Member

Install an earlier version of erdos using pip with pip install erdos==0.3.1, or git checkout a tag corresponding to a prior release when installing from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants