Closed zyzhang1130 closed 2 years ago
Hi @zyzhang1130,
comp-1
headless=False
to env=gym.make()
in <path>/SMARTS/competition/track1/train/train/env.py
to enable Envision, such that you have the following.
# Create environment
env = gym.make(
"smarts.env:multi-scenario-v0",
scenario=scenario,
img_meters=config["img_meters"],
img_pixels=config["img_pixels"],
sumo_headless=not config["sumo_gui"], # If False, enables sumo-gui display.
headless=False, # If False, enables Envision display.
)
<path>/SMARTS/competition/track1/train/config.yaml
, such that you have the following.
eval_eps: 2 # Number of evaluation epsiodes.
$ cd <path>/SMARTS
$ docker build --file=./competition/track1/train/Dockerfile --network=host --tag=multi_scenario .
$ docker run --rm -it --network=host --gpus=all multi_scenario
$ cd /src/competition/track1/train
$ scl envision start -s /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/ &
http://localhost:8081/#/all
.$ cd /src/competition/track1/train
$ python3.8 run.py --mode=evaluate --model=/src/competition/track1/submission/best_model.zip
http://localhost:8081/#/all
.Hi @Adaickalavan , just to check do I have to select gpu in
docker run --rm -it --network=host --gpus=all multi_scenario
It threw error since it is not available on iMAC.
I also tried on Windows 11. The following is the output:
root@docker-desktop:/src/competition/track1/train# python run.py --mode=evaluate --model=/src/competition/track1/submission/best_model.zip
Torch cuda is available: False
Logdir: /src/competition/track1/train/logs/2022_09_12_12_31_57
Model: /src/competition/track1/submission/best_model.zip
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/intersection/1_to_2lane_left_turn_c/. ...
/opt/.venv/lib/python3.8/site-packages/gym/logger.py:34: UserWarning: WARN: Box bound precision lowered by casting to float32
warnings.warn(colorize("%s: %s" % ("WARN", msg % args), "yellow"))
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/intersection/1_to_2lane_left_turn_c/. ...
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/intersection/1_to_2lane_left_turn_t/. ...
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/intersection/1_to_2lane_left_turn_t/. ...
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/merge/3lane_single_agent/. ...
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/merge/3lane_single_agent/. ...
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/straight/3lane_cruise_single_agent/. ...
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/straight/3lane_cruise_single_agent/. ...
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/straight/3lane_overtake/. ...
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/straight/3lane_overtake/. ...
Evaluate policy.
== CURRENT SYSTEM INFO ==
OS: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.10 #1 SMP Wed Mar 2 00:30:59 UTC 2022
Python: 3.8.5
Stable-Baselines3: 1.4.0
PyTorch: 1.12.0+cu102
GPU Enabled: False
Numpy: 1.19.5
Gym: 0.19.0
== SAVED MODEL SYSTEM INFO ==
OS: Linux-5.13.0-44-generic-x86_64-with-glibc2.29 #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022
Python: 3.8.10
Stable-Baselines3: 1.4.0
PyTorch: 1.12.0+cu102
GPU Enabled: True
Numpy: 1.23.1
Gym: 0.19.0
/opt/.venv/lib/python3.8/site-packages/stable_baselines3/common/base_class.py:687: ResourceWarning: unclosed file <_io.BufferedReader name='/src/competition/track1/submission/best_model.zip'>
data, params, pytorch_variables = load_from_zip_file(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Evaluating env 1_to_2lane_left_turn_c.
Retrying in 0.05 seconds
:device(error): Error adding inotify watch on /dev/input: No such file or directory
:device(error): Error opening directory /dev/input: No such file or directory
Agent_0: Reached max episode steps.
Agent_0: Reached max episode steps.
Mean reward:0.00 +/- 0.00
Evaluating env 1_to_2lane_left_turn_t.
Agent_0: Reached max episode steps.
Agent_0: Reached max episode steps.
Mean reward:0.00 +/- 0.00
Evaluating env 3lane_merge_single_agent.
Agent_0: Reached max episode steps.
Agent_0: Reached max episode steps.
Mean reward:0.00 +/- 0.00
Evaluating env 3lane_cruise_single_agent.
Agent_0: Reached max episode steps.
Agent_0: Reached max episode steps.
Mean reward:0.00 +/- 0.00
Evaluating env 3lane_overtake.
Agent_0: Reached max episode steps.
Agent_0: Reached max episode steps.
Mean reward:0.00 +/- 0.00
Finished evaluating.
but http://localhost:8081/#/all
still shows
Unable to connect
Firefox can’t establish a connection to the server at localhost:8081.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
Finally, I tried docker pull huaweinoah/smarts
to directly pull the image from dockerhub. However, when running this image, I couldn't do git checkout comp-1
because of the following error:
# git checkout comp-1
error: pathspec 'comp-1' did not match any file(s) known to git.#
UPDATE: the following is the latest error I got running image pulled from docker hub:
# cd competition/track1/train
# scl envision start -s /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/ &
# python run.py --mode=evaluate --model=/SMARTS/competition/track1/submission/best_model.zip
Torch cuda is available: False
Logdir: /SMARTS/competition/track1/train/logs/2022_09_12_18_19_59
Model: /SMARTS/competition/track1/submission/best_model.zip
Waiting on /SMARTS/smarts/scenarios/intersection/1_to_2lane_left_turn_c/. ...
/opt/.venv/lib/python3.7/site-packages/gym/spaces/box.py:74: UserWarning: WARN: Box bound precision lowered by casting to float32
"Box bound precision lowered by casting to {}".format(self.dtype)
Waiting on /SMARTS/smarts/scenarios/intersection/1_to_2lane_left_turn_c/. ...
Waiting on /SMARTS/smarts/scenarios/intersection/1_to_2lane_left_turn_t/. ...
Waiting on /SMARTS/smarts/scenarios/intersection/1_to_2lane_left_turn_t/. ...
Waiting on /SMARTS/smarts/scenarios/merge/3lane_single_agent/. ...
Waiting on /SMARTS/smarts/scenarios/merge/3lane_single_agent/. ...
Waiting on /SMARTS/smarts/scenarios/straight/3lane_cruise_single_agent/. ...
Waiting on /SMARTS/smarts/scenarios/straight/3lane_cruise_single_agent/. ...
Waiting on /SMARTS/smarts/scenarios/straight/3lane_overtake/. ...
Waiting on /SMARTS/smarts/scenarios/straight/3lane_overtake/. ...
Evaluate policy.
== CURRENT SYSTEM INFO ==
OS: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic #1 SMP Wed Mar 2 00:30:59 UTC 2022
Python: 3.7.13
Stable-Baselines3: 1.6.0
PyTorch: 1.12.1+cu102
GPU Enabled: False
Numpy: 1.21.6
Gym: 0.21.0
== SAVED MODEL SYSTEM INFO ==
OS: Linux-5.13.0-44-generic-x86_64-with-glibc2.29 #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022
Python: 3.8.10
Stable-Baselines3: 1.4.0
PyTorch: 1.12.0+cu102
GPU Enabled: True
Numpy: 1.23.1
Gym: 0.19.0
Traceback (most recent call last):
File "run.py", line 158, in <module>
main(args)
File "run.py", line 70, in main
run(envs_train=envs_train, envs_eval=envs_eval, config=config)
File "run.py", line 120, in run
config["model"], print_system_info=True
File "/opt/.venv/lib/python3.7/site-packages/stable_baselines3/common/base_class.py", line 705, in load
path, device=device, custom_objects=custom_objects, print_system_info=print_system_info
File "/opt/.venv/lib/python3.7/site-packages/stable_baselines3/common/save_util.py", line 419, in load_from_zip_file
data = json_to_data(json_data, custom_objects=custom_objects)
File "/opt/.venv/lib/python3.7/site-packages/stable_baselines3/common/save_util.py", line 164, in json_to_data
deserialized_object = cloudpickle.loads(base64_object)
ValueError: unsupported pickle protocol: 5
sys:1: ResourceWarning: unclosed file <_io.BufferedReader name='/SMARTS/competition/track1/submission/best_model.zip'>
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/SMARTS/competition/track1/train/logs/2022_09_12_18_19_59/monitor.csv' mode='wt' encoding='UTF-8'>
Exception ignored in: <function SMARTS.__del__ at 0x7f732945fb90>
Traceback (most recent call last):
File "/SMARTS/smarts/core/smarts.py", line 860, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function BulletClient.__del__ at 0x7f732bb079e0>
Traceback (most recent call last):
File "/opt/.venv/lib/python3.7/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
AttributeError: 'NoneType' object has no attribute 'error'
Exception ignored in: <function SMARTS.__del__ at 0x7f732945fb90>
Traceback (most recent call last):
File "/SMARTS/smarts/core/smarts.py", line 860, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function BulletClient.__del__ at 0x7f732bb079e0>
Traceback (most recent call last):
File "/opt/.venv/lib/python3.7/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
AttributeError: 'NoneType' object has no attribute 'error'
Exception ignored in: <function SMARTS.__del__ at 0x7f732945fb90>
Traceback (most recent call last):
File "/SMARTS/smarts/core/smarts.py", line 860, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function BulletClient.__del__ at 0x7f732bb079e0>
Traceback (most recent call last):
File "/opt/.venv/lib/python3.7/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
AttributeError: 'NoneType' object has no attribute 'error'
Exception ignored in: <function SMARTS.__del__ at 0x7f732945fb90>
Traceback (most recent call last):
File "/SMARTS/smarts/core/smarts.py", line 860, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function BulletClient.__del__ at 0x7f732bb079e0>
Traceback (most recent call last):
File "/opt/.venv/lib/python3.7/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
AttributeError: 'NoneType' object has no attribute 'error'
Exception ignored in: <function SMARTS.__del__ at 0x7f732945fb90>
Traceback (most recent call last):
File "/SMARTS/smarts/core/smarts.py", line 860, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function BulletClient.__del__ at 0x7f732bb079e0>
Traceback (most recent call last):
File "/opt/.venv/lib/python3.7/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
AttributeError: 'NoneType' object has no attribute 'error'
Exception ignored in: <function SMARTS.__del__ at 0x7f732945fb90>
Traceback (most recent call last):
File "/SMARTS/smarts/core/smarts.py", line 860, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function BulletClient.__del__ at 0x7f732bb079e0>
Traceback (most recent call last):
File "/opt/.venv/lib/python3.7/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
AttributeError: 'NoneType' object has no attribute 'error'
Exception ignored in: <function SMARTS.__del__ at 0x7f732945fb90>
Traceback (most recent call last):
File "/SMARTS/smarts/core/smarts.py", line 860, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function BulletClient.__del__ at 0x7f732bb079e0>
Traceback (most recent call last):
File "/opt/.venv/lib/python3.7/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
AttributeError: 'NoneType' object has no attribute 'error'
Exception ignored in: <function SMARTS.__del__ at 0x7f732945fb90>
Traceback (most recent call last):
File "/SMARTS/smarts/core/smarts.py", line 860, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function BulletClient.__del__ at 0x7f732bb079e0>
Traceback (most recent call last):
File "/opt/.venv/lib/python3.7/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
AttributeError: 'NoneType' object has no attribute 'error'
Exception ignored in: <function SMARTS.__del__ at 0x7f732945fb90>
Traceback (most recent call last):
File "/SMARTS/smarts/core/smarts.py", line 860, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function BulletClient.__del__ at 0x7f732bb079e0>
Traceback (most recent call last):
File "/opt/.venv/lib/python3.7/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
AttributeError: 'NoneType' object has no attribute 'error'
Exception ignored in: <function SMARTS.__del__ at 0x7f732945fb90>
Traceback (most recent call last):
File "/SMARTS/smarts/core/smarts.py", line 860, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <function BulletClient.__del__ at 0x7f732bb079e0>
Traceback (most recent call last):
File "/opt/.venv/lib/python3.7/site-packages/pybullet_utils/bullet_client.py", line 38, in __del__
AttributeError: 'NoneType' object has no attribute 'error'
#
Hi @zyzhang1130,
$ docker run --rm -it --network=host multi_scenario
--gpu=all
when running the docker container.@Adaickalavan Tried on macOS (with M1 chip) again still no visuals onhttp://localhost:8081/#/all
. The followings are the step-by-step command executions and error messages:
SMARTS % docker build --file=./competition/track1/train/Dockerfile --network=host --tag=multi_scenario .
[+] Building 63.0s (16/16) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 35B 0.0s
=> [internal] load metadata for docker.io/pytorch/pytorch:1.7.1-cuda11.0 3.0s
=> [auth] pytorch/pytorch:pull token for registry-1.docker.io 0.0s
=> [ 1/10] FROM docker.io/pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime@ 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 124.23kB 0.3s
=> CACHED [ 2/10] RUN apt-get update --fix-missing && apt-get instal 0.0s
=> CACHED [ 3/10] RUN update-alternatives --install /usr/bin/python pyth 0.0s
=> CACHED [ 4/10] RUN python3.8 -m venv /opt/.venv 0.0s
=> CACHED [ 5/10] RUN pip install --upgrade pip wheel 0.0s
=> CACHED [ 6/10] COPY ./competition/track1/train/requirements.txt /tmp/ 0.0s
=> CACHED [ 7/10] RUN pip install --no-cache-dir -r /tmp/requirements.tx 0.0s
=> [ 8/10] COPY . /src 4.0s
=> [ 9/10] WORKDIR /src 0.0s
=> [10/10] RUN pip install --no-cache-dir -e ./competition/track1/train 54.7s
=> exporting to image 0.9s
=> => exporting layers 0.9s
=> => writing image sha256:c418a375f6ede37c0dca9487d67f08f57e3b56132fbfd 0.0s
=> => naming to docker.io/library/multi_scenario 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
(base) zhangzeyu@Zhangs-iMac SMARTS % docker run --rm -it --network=host --gpus=all multi_scenario
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
(base) zhangzeyu@Zhangs-iMac SMARTS % docker run --rm -it --network=host multi_scenario
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
root@docker-desktop:/src# cd /src/competition/track1/train
root@docker-desktop:/src/competition/track1/train# scl envision start -s /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/ &
[1] 31
root@docker-desktop:/src/competition/track1/train# The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
root@docker-desktop:/src/competition/track1/train# cd /src/competition/track1/train
root@docker-desktop:/src/competition/track1/train# python3.8 run.py --mode=evaluate --model=/src/competition/track1/submission/best_model.zip
Torch cuda is available: False
Logdir: /src/competition/track1/train/logs/2022_09_13_03_49_01
Model: /src/competition/track1/submission/best_model.zip
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
pip install pathos==0.2.8 tabulate>=0.8.10 waymo-open-dataset-tf-2-4-0
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/intersection/1_to_2lane_left_turn_c/. ...
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
/opt/.venv/lib/python3.8/site-packages/gym/logger.py:34: UserWarning: WARN: Box bound precision lowered by casting to float32
warnings.warn(colorize("%s: %s" % ("WARN", msg % args), "yellow"))
The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
pip install pathos==0.2.8 tabulate>=0.8.10 waymo-open-dataset-tf-2-4-0
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/intersection/1_to_2lane_left_turn_c/. ...
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
pip install pathos==0.2.8 tabulate>=0.8.10 waymo-open-dataset-tf-2-4-0
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/intersection/1_to_2lane_left_turn_t/. ...
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
pip install pathos==0.2.8 tabulate>=0.8.10 waymo-open-dataset-tf-2-4-0
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/intersection/1_to_2lane_left_turn_t/. ...
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
pip install pathos==0.2.8 tabulate>=0.8.10 waymo-open-dataset-tf-2-4-0
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/merge/3lane_single_agent/. ...
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
pip install pathos==0.2.8 tabulate>=0.8.10 waymo-open-dataset-tf-2-4-0
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/merge/3lane_single_agent/. ...
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
pip install pathos==0.2.8 tabulate>=0.8.10 waymo-open-dataset-tf-2-4-0
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/straight/3lane_cruise_single_agent/. ...
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
pip install pathos==0.2.8 tabulate>=0.8.10 waymo-open-dataset-tf-2-4-0
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/straight/3lane_cruise_single_agent/. ...
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
pip install pathos==0.2.8 tabulate>=0.8.10 waymo-open-dataset-tf-2-4-0
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/straight/3lane_overtake/. ...
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
The `scl waymo` command is unavailable. To enable, pip install the missing dependencies.
pip install pathos==0.2.8 tabulate>=0.8.10 waymo-open-dataset-tf-2-4-0
Waiting on /opt/.venv/lib/python3.8/site-packages/smarts/scenarios/straight/3lane_overtake/. ...
/opt/.venv/lib/python3.8/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
Evaluate policy.
== CURRENT SYSTEM INFO ==
OS: Linux-5.10.124-linuxkit-x86_64-with-glibc2.10 #1 SMP PREEMPT Thu Jun 30 08:18:26 UTC 2022
Python: 3.8.5
Stable-Baselines3: 1.4.0
PyTorch: 1.12.0+cu102
GPU Enabled: False
Numpy: 1.23.1
Gym: 0.19.0
== SAVED MODEL SYSTEM INFO ==
OS: Linux-5.13.0-44-generic-x86_64-with-glibc2.29 #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022
Python: 3.8.10
Stable-Baselines3: 1.4.0
PyTorch: 1.12.0+cu102
GPU Enabled: True
Numpy: 1.23.1
Gym: 0.19.0
/opt/.venv/lib/python3.8/site-packages/stable_baselines3/common/base_class.py:687: ResourceWarning: unclosed file <_io.BufferedReader name='/src/competition/track1/submission/best_model.zip'>
data, params, pytorch_variables = load_from_zip_file(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
[W NNPACK.cpp:51] Could not initialize NNPACK! Reason: Unsupported hardware.
Evaluating env 1_to_2lane_left_turn_c.
Retrying in 0.05 seconds
Could not connect to TraCI server at localhost:63681 [Errno 111] Connection refused
Retrying in 0.05 seconds
Could not connect to TraCI server at localhost:63681 [Errno 111] Connection refused
Retrying in 0.05 seconds
:device(error): Error initializing inotify: Bad file descriptor
:device(error): Error opening directory /dev/input: No such file or directory
Agent_0: Reached max episode steps.
http://localhost:8081/#/all
after refreshing the page several times or do you simply get a connection refused message?docker run --rm -it -p 8081:8081 multi_scenario
docker run --rm -it -P multi_scenario
Do you have a Linux (i.e., Ubuntu) system?
Were steps 1, 2, and 3 performed?
What was the docker container output for evaluating the remaining 4 scenarios, as they seem missing from the end of your response?
Does anything at all appear on
http://localhost:8081/#/all
after refreshing the page several times or do you simply get a connection refused message?Try replacing step 4 with either of these:
docker run --rm -it -p 8081:8081 multi_scenario
docker run --rm -it -P multi_scenario
Evaluate policy.
== CURRENT SYSTEM INFO == OS: Linux-5.10.124-linuxkit-x86_64-with-glibc2.10 #1 SMP PREEMPT Thu Jun 30 08:18:26 UTC 2022 Python: 3.8.5 Stable-Baselines3: 1.4.0 PyTorch: 1.12.0+cu102 GPU Enabled: False Numpy: 1.23.1 Gym: 0.19.0
== SAVED MODEL SYSTEM INFO == OS: Linux-5.13.0-44-generic-x86_64-with-glibc2.29 #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022 Python: 3.8.10 Stable-Baselines3: 1.4.0 PyTorch: 1.12.0+cu102 GPU Enabled: True Numpy: 1.23.1 Gym: 0.19.0
/opt/.venv/lib/python3.8/site-packages/stable_baselines3/common/base_class.py:687: ResourceWarning: unclosed file <_io.BufferedReader name='/src/competition/track1/submission/best_model.zip'> data, params, pytorch_variables = load_from_zip_file( ResourceWarning: Enable tracemalloc to get the object allocation traceback [W NNPACK.cpp:51] Could not initialize NNPACK! Reason: Unsupported hardware.
Evaluating env 1_to_2lane_left_turn_c. Retrying in 0.05 seconds Could not connect to TraCI server at localhost:63681 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:63681 [Errno 111] Connection refused Retrying in 0.05 seconds :device(error): Error initializing inotify: Bad file descriptor :device(error): Error opening directory /dev/input: No such file or directory Agent_0: Reached max episode steps. Agent_0: Reached max episode steps. Mean reward:0.00 +/- 0.00
Evaluating env 1_to_2lane_left_turn_t. Retrying in 0.05 seconds Could not connect to TraCI server at localhost:55727 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:55727 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:55727 [Errno 111] Connection refused Retrying in 0.05 seconds Agent_0: Reached max episode steps. Agent_0: Reached max episode steps. Mean reward:0.00 +/- 0.00
Evaluating env 3lane_merge_single_agent. Retrying in 0.05 seconds Could not connect to TraCI server at localhost:56921 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:56921 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:56921 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:56921 [Errno 111] Connection refused Retrying in 0.05 seconds Agent_0: Reached max episode steps. Agent_0: Reached max episode steps. Mean reward:0.00 +/- 0.00
Evaluating env 3lane_cruise_single_agent. Retrying in 0.05 seconds Could not connect to TraCI server at localhost:57627 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:57627 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:57627 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:57627 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:57627 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:57627 [Errno 111] Connection refused Retrying in 0.05 seconds Could not connect to TraCI server at localhost:57627 [Errno 111] Connection refused Retrying in 0.05 seconds Agent_0: Reached max episode steps.
4. I have tried refreshing multiple times, at step 6 and 9, but it always give the following:
<img width="1360" alt="Screenshot 2022-09-13 at 1 25 29 PM" src="https://user-images.githubusercontent.com/36942574/189816089-71e55998-56f9-480f-b416-632d0252b6f0.png">
5. UPDATE: I tried `docker run --rm -it -p 8081:8081 multi_scenario` and changed my browser from firefox to chrome and got the following:
<img width="1184" alt="Screenshot 2022-09-13 at 1 34 31 PM" src="https://user-images.githubusercontent.com/36942574/189817431-86870be5-75f4-43de-bdeb-a22e85f1e0e8.png">
I suspect the issue is due to the browser because on firefox it still says 'unable to connect'.
The black screen I supposed is because of step 7 is still running?
http://localhost:8081/#/all
shown in your reply indicates that Envision server is now running and the port is accessible in your localhost from within the container.Evaluating env 1_to_2lane_left_turn_c.
Agent_0: Reached max episode steps.
Agent_0: Reached max episode steps.
Mean reward:0.00 +/- 0.00
.
.
.
Evaluating env 3lane_cruise_single_agent.
Agent_0: Reached max episode steps.
Agent_0: Reached max episode steps.
Mean reward:0.00 +/- 0.00
The above messages imply that simulation proper has started, thus road networks and agents should be displayed in the Envision server at http://localhost:8081/#/all
.
The display at
http://localhost:8081/#/all
shown in your reply indicates that Envision server is now running and the port is accessible in your localhost from within the container.
On Step 8, building of all the scenarios take some time. Hence, try waiting and refresing the webpage. See if any road networks appear on the webpage when messages such as the following are being printed inside the docker container terminal.
Evaluating env 1_to_2lane_left_turn_c. Agent_0: Reached max episode steps. Agent_0: Reached max episode steps. Mean reward:0.00 +/- 0.00 . . . Evaluating env 3lane_cruise_single_agent. Agent_0: Reached max episode steps. Agent_0: Reached max episode steps. Mean reward:0.00 +/- 0.00
The above messages imply that simulation proper has started, thus road networks and agents should be displayed in the Envision server at
http://localhost:8081/#/all
.
finally got it running. Thank you so much!
High Level Description Unable to have visuals of the running example
Desired SMARTS version comp-1
Operating System macOS
Problems I'm running the example
on docker as opened http://localhost:8081/ as instructed on my own machine, but my browser showed: