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

Bugtest sumo crash reproduction #619

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
**/traffic_histories.pkl
**/*.trips.xml
**/.venv
**/.bugtest
**/.vscode
**/wheels/
**/xdummy.log
Expand All @@ -62,4 +63,7 @@
!smarts/sstudio/tests/*.rou.xml

# Keep model assets
!**/models/*.glb
!**/models/*.glb

# Keep bugtest
!**/loop/**
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ celerybeat-schedule
# Environments
.venv
venv
.bugtest

# Spyder project settings
.spyderproject
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile → bugtest.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ RUN wget -O /etc/X11/xorg.conf http://xpra.org/xorg.conf && \
ENV SUMO_HOME /usr/share/sumo

# Install requirements.txt
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
COPY bugtest_requirements.txt /tmp/requirements.txt

# Copy source files and install SMARTS
ENV PYTHONPATH=/src
COPY . /src
WORKDIR /src
RUN pip install --no-cache-dir -e .[train,test,dev]
RUN pip install --no-cache-dir -e . && \
pip install --no-cache-dir -r /tmp/requirements.txt && \
rm -r .git

# For Envision
EXPOSE 8081
Expand All @@ -68,6 +69,7 @@ EXPOSE 8081
# could close x-server. Even though it's "running in the background".
RUN echo "/usr/bin/Xorg " \
"-noreset +extension GLX +extension RANDR +extension RENDER" \
"-logfile ./xdummy.log -config /etc/X11/xorg.conf -novtswitch $DISPLAY &" >> ~/.bashrc
"-logfile ./xdummy.log -config /etc/X11/xorg.conf -novtswitch $DISPLAY &" >> ~/.bashrc && \
echo "export PYTHONHASHSEED=42" >> ~/.bashrc

SHELL ["/bin/bash", "-c", "-l"]
218 changes: 218 additions & 0 deletions bugtest_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
absl-py==0.11.0
aiohttp==3.7.3
aiohttp-cors==0.7.0
aioredis==1.3.1
alabaster==0.7.12
apipkg==1.5
appdirs==1.4.4
argon2-cffi==20.1.0
astunparse==1.6.3
async-timeout==3.0.1
atari-py==0.2.6
attrs==20.3.0
Automat==20.2.0
Babel==2.9.0
backcall==0.2.0
beautifulsoup4==4.9.3
black==20.8b1
bleach==3.3.0
blessings==1.7
cachetools==4.2.1
casadi==3.5.5
certifi==2020.12.5
cffi==1.14.5
chardet==3.0.4
click==7.1.2
cloudpickle==1.3.0
colorama==0.4.4
colorful==0.5.4
commonmark==0.9.1
constantly==15.1.0
coverage==5.4
cryptography==3.4.6
cycler==0.10.0
decorator==4.4.2
defusedxml==0.6.0
dm-tree==0.1.5
docutils==0.16
entrypoints==0.3
evdev==1.4.0
execnet==1.8.0
filelock==3.0.12
future==0.18.2
gast==0.3.3
gitdb==4.0.5
GitPython==3.1.13
google==3.0.0
google-api-core==1.26.0
google-auth==1.27.0
google-auth-oauthlib==0.4.2
google-pasta==0.2.0
googleapis-common-protos==1.52.0
gpustat==0.6.0
grpcio==1.30.0
grpcio-tools==1.30.0
gym==0.18.0
h5py==2.10.0
hiredis==1.1.0
hyperlink==21.0.0
idna==2.10
imageio==2.9.0
imagesize==1.2.0
importlib-metadata==3.4.0
importlib-resources==5.1.0
incremental==17.5.0
iniconfig==1.1.1
ipykernel==5.4.3
ipython==7.20.0
ipython-genutils==0.2.0
isort==5.7.0
jedi==0.18.0
jeepney==0.6.0
Jinja2==2.11.3
joblib==1.0.1
jsonpatch==1.28
jsonpointer==2.0
jsonschema==3.2.0
jupyter-client==6.1.11
jupyter-core==4.7.1
Keras-Preprocessing==1.1.2
keyring==22.0.1
kiwisolver==1.3.1
lz4==3.1.3
Markdown==3.3.3
MarkupSafe==1.1.1
matplotlib==3.3.4
maturin==0.9.1
mistune==0.8.4
msgpack==1.0.2
multidict==5.1.0
mypy-extensions==0.4.3
nbconvert==5.6.1
nbdime==2.1.0
nbformat==5.1.2
networkx==2.5
notebook==6.2.0
numpy==1.18.5
nvidia-ml-py3==7.352.0
oauthlib==3.1.0
open-agent==0.0.0
opencensus==0.7.12
opencensus-context==0.1.2
opencv-python==4.5.1.48
opencv-python-headless==4.3.0.36
opengen==0.6.4
opt-einsum==3.3.0
packaging==20.9
panda3d==1.10.8
panda3d-gltf==0.12
panda3d-simplepbr==0.7
pandas==1.2.2
pandocfilters==1.4.3
parso==0.8.1
pathspec==0.8.1
pbr==5.5.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.2.0
pkginfo==1.7.0
pluggy==0.13.1
prometheus-client==0.9.0
prompt-toolkit==3.0.16
protobuf==3.14.0
psutil==5.8.0
ptyprocess==0.7.0
py==1.10.0
py-cpuinfo==7.0.0
py-spy==0.3.4
pyasn1==0.4.8
pyasn1-modules==0.2.8
pybullet==3.0.8
pycparser==2.20
pyglet==1.5.0
Pygments==2.8.0
PyHamcrest==2.0.2
pynput==1.7.3
pyparsing==2.4.7
pyrsistent==0.17.3
pytest==6.2.2
pytest-benchmark==3.2.3
pytest-cov==2.11.1
pytest-forked==1.3.0
pytest-notebook==0.6.1
pytest-xdist==2.2.1
python-dateutil==2.8.1
python-xlib==0.29
pytz==2021.1
PyWavelets==1.1.1
PyYAML==5.4.1
pyzmq==22.0.3
ray==1.0.1.post1
readme-renderer==28.0
redis==3.4.1
regex==2020.11.13
requests==2.25.1
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
retry==0.9.2
rfc3986==1.4.0
rich==9.11.0
rsa==4.7.1
Rtree==0.9.7
scikit-image==0.18.1
scikit-learn==0.24.1
scipy==1.4.1
SecretStorage==3.3.1
Send2Trash==1.5.0
sh==1.14.1
Shapely==1.7.1
six==1.15.0
sklearn==0.0
smmap==3.0.5
snowballstemmer==2.1.0
soupsieve==2.2
Sphinx==3.5.1
sphinx-rtd-theme==0.5.1
sphinxcontrib-apidoc==0.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
supervisor==4.2.1
tableprint==0.9.1
tabulate==0.8.8
tensorboard==2.2.2
tensorboard-plugin-wit==1.8.0
tensorboardX==2.1
tensorflow==2.2.1
tensorflow-estimator==2.2.0
termcolor==1.1.0
terminado==0.9.2
testpath==0.4.4
threadpoolctl==2.1.0
tifffile==2021.2.1
toml==0.10.2
torch==1.4.0
torchfile==0.1.0
torchvision==0.5.0
tornado==6.1
tqdm==4.57.0
traitlets==5.0.5
trimesh==3.9.7
twine==3.3.0
Twisted==20.3.0
typed-ast==1.4.2
typing-extensions==3.7.4.3
urllib3==1.26.3
visdom==0.1.8.9
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==0.57.0
Werkzeug==1.0.1
wrapt==1.12.1
yarl==1.6.3
yattag==1.14.0
zipp==3.4.0
zope.interface==5.2.0
Binary file added crash_test/agent_007_0_0
Binary file not shown.
Binary file added crash_test/agent_kla_1_0
Binary file not shown.
Binary file added crash_test/agent_oa_3_0
Binary file not shown.
Binary file added crash_test/agent_oa_4_0
Binary file not shown.
Binary file added crash_test/agent_oa_5_0
Binary file not shown.
Binary file added crash_test/agent_oa_6_0
Binary file not shown.
1 change: 1 addition & 0 deletions crash_test/speed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
46
1 change: 1 addition & 0 deletions crash_test/steps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
106
29 changes: 29 additions & 0 deletions crash_trial.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
TEMP_DIR=${1}_TMP
START=${2}
COUNT=${3}
MAX_STEPS=${4}
BEST_STEPS=$MAX_STEPS


for (( SPEED=$START; SPEED<$START + $COUNT; SPEED++ ))
do
if [[ -d $TEMP_DIR ]]; then
rm -r $TEMP_DIR
fi
PYTHONHASHSEED=42 python3.7 examples/bugtest.py scenarios/loop --speed ${SPEED} --save-dir $TEMP_DIR --max-steps $MAX_STEPS --write --headless
STEPS=$?
if (( $STEPS < $BEST_STEPS )); then
echo $STEPS > ${TEMP_DIR}/steps.txt
echo $SPEED > ${TEMP_DIR}/speed.txt
echo "Steps taken ${STEPS}0, Speed: ${SPEED}"
if [[ -d $1 ]]; then
rm -r $1
fi
mv ${TEMP_DIR} $1
BEST_STEPS=$STEPS
break
fi
done
if [[ -d $TEMP_DIR ]]; then
rm -r $TEMP_DIR
fi
Loading