Skip to content

Commit 130813f

Browse files
holger-motionalHolger Caesar
andauthored
Initial commit (#2)
Co-authored-by: Holger Caesar <holger.caesar@motional.com>
1 parent 8621802 commit 130813f

File tree

642 files changed

+51296
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

642 files changed

+51296
-6
lines changed

.bazelrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
build --remote_cache=http://bazel-cache.ci.motional.com:80
2+
build --remote_upload_local_results=false
3+
4+
test --test_output=errors
5+
test --test_timeout=2400
6+
test --test_output=all
7+
test --test_env=WORKSPACE
8+
test --test_env=CACHE=/tmp/pyxbld
9+
test --test_env=PYTHONPATH
10+
test --test_env=AWS_ACCESS_KEY_ID
11+
test --test_env=AWS_SECRET_ACCESS_KEY
12+
13+
test --test_env=NUPLAN_DATA_ROOT
14+
test --test_env=NUPLAN_EXP_ROOT
15+
test --test_env=NUPLAN_DATA_STORE
16+
test --test_env=NUPLAN_S3_PROFILE
17+
test --test_env=NUPLAN_S3_ROOT_URL
18+
test --test_env=NUPLAN_MAPS_S3_ROOT_URL
19+
test --test_env=NUPLAN_HYDRA_CONFIG_PATH

.gitignore

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1-
.idea/
1+
*._*
2+
*.aux
3+
.bazel
4+
bazel-*
5+
*.bbl
6+
*.blg
7+
*.brf
8+
.coverage
9+
.DS_Store
10+
*.egg-info
11+
_ext
12+
*.gz
13+
.idea
14+
.ijwb
15+
*ipynb_*
16+
.isort.cfg
17+
*.jpg
18+
*.log
19+
*.o
20+
*.out
21+
*.pdf
22+
.project
23+
*.pth.tar
24+
*.pyc
25+
**/__pycache__/
26+
.pydevproject
27+
*.so
28+
.vscode/*

.mypy.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Global options:
2+
3+
[mypy]
4+
5+
# Per-module options:

.pre-commit-config.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Exclude hidden files, init, tensorrt folders, protobuf generated files, markdown files, and DB model.py files
2+
exclude: ^(.*/\..*|.*__init__.py|.*tensorrt.*|.*_pb2.py|.*.md|.*.database.*.models.py)$
3+
default_language_version:
4+
python: python3.9
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v3.4.0
8+
hooks:
9+
- id: no-commit-to-branch # Prevents direct commits to master
10+
- id: check-ast # check if valid python file
11+
- id: check-merge-conflict # check if left in merge conflict lines
12+
- id: debug-statements # check if left in debug statements
13+
- id: trailing-whitespace # remove trailing whitespace
14+
- id: end-of-file-fixer # have one line at end of file
15+
- id: check-docstring-first # File comments should come before imports
16+
- id: check-json # make sure valid json
17+
- id: check-yaml # make sure valid yaml
18+
- id: name-tests-test # check that tests start with test_*
19+
args: ['--django']
20+
- id: requirements-txt-fixer # sort requirements
21+
- id: check-added-large-files # check that we're not committing big files to git, excluding lfs files.
22+
args: ['--maxkb=1000'] # set max file size to 1000KB
23+
- repo: https://github.com/asottile/pyupgrade # use Python3 tricks
24+
rev: v2.2.0
25+
hooks:
26+
- id: pyupgrade
27+
args: ['--keep-percent-format']
28+
- repo: https://github.com/asottile/seed-isort-config # Helps isort determine third party imports
29+
rev: v2.1.1
30+
hooks:
31+
- id: seed-isort-config
32+
- repo: https://github.com/pre-commit/mirrors-isort # Sort imports, similar to PyCharm organize imports
33+
rev: v4.3.21
34+
hooks:
35+
- id: isort
36+
args: ['-l=120', '-m=2']
37+
- repo: https://github.com/pre-commit/mirrors-autopep8 # Autoenforce easy pep8 changes.
38+
rev: v1.5.1
39+
hooks:
40+
- id: autopep8
41+
args: ['-i', '--max-line-length=120', '--ignore=W504'] # W504 is outdated and conflicts with W503
42+
- repo: https://gitlab.com/pycqa/flake8 # Check for pep8. Autopep8 won't fix everything.
43+
rev: 3.7.9
44+
hooks:
45+
- id: flake8
46+
args: ['--max-line-length=120', '--ignore=W504'] # W504 is outdated and conflicts with W503
47+
- repo: https://github.com/aflc/pre-commit-jupyter
48+
rev: v1.1.0
49+
hooks:
50+
- id: jupyter-notebook-cleanup
51+
args:
52+
- --remove-kernel-metadata
53+
- --pin-patterns
54+
- "[pin];[donotremove]"
55+
- repo: https://github.com/pre-commit/mirrors-mypy
56+
rev: 'v0.910'
57+
hooks:
58+
- id: mypy
59+
additional_dependencies:
60+
- types-protobuf==3.17.4
61+
- types-cachetools
62+
- types-ujson
63+
- types-requests
64+
- numpy
65+
args:
66+
- --config-file=.mypy.ini
67+
- --ignore-missing-imports # silence all import errors from untyped libraries
68+
- --follow-imports=silent # follow imports but suppress all errors
69+
- --strict # enable strict flags (e.g. untyped calls, decorators, optional)
70+
- --allow-subclassing-any # allow subclassing from classes in silenced modules
71+
- --show-column-numbers # add column offsets to error messages
72+
- --allow-untyped-decorators # allow decorating typed functions with untyped decorators (such as nuplan_test)

BUILD

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
load("@rules_python//python:defs.bzl", "py_library")
2+
3+
package(default_visibility = ["//visibility:public"])
4+
5+
py_library(
6+
name = "__init__",
7+
srcs = ["__init__.py"],
8+
)
9+
10+
filegroup(
11+
name = "jenkins_env",
12+
data = [
13+
"requirements.txt",
14+
],
15+
)

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM 233885420847.dkr.ecr.us-east-1.amazonaws.com/python:3.9.7-slim-buster
1+
FROM python:3.9.7-slim-buster
22

33
RUN apt-get update \
44
&& apt-get install -y curl gnupg2 software-properties-common default-jdk

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ if (env.BRANCH_NAME != null && ! env.BRANCH_NAME.matches("^(master).*")) {
77
pipeline{
88
agent {
99
kubernetes(
10-
jnlp.builder(
10+
jnlp.nuplan_devkit(
1111
name: 'nuplan-devkit-tests',
12-
builder_image: "233885420847.dkr.ecr.us-east-1.amazonaws.com/nuplan-devkit:v1.0.1",
12+
tag: "v1.0.2",
1313
cpu: 1, maxcpu: 2,
1414
memory: "1G", maxmemory: "5G"))
1515
}

LICENSE.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2021 Motional
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

README.md

Lines changed: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,89 @@
11
# nuplan-devkit
22

3-
Welcome to the devkit of the [nuPlan](https://www.nuplan.org).
4-
This repo is currently under development and will be ready for the teaser release on December 10, 2021.
3+
Welcome to the devkit of [nuPlan](https://www.nuplan.org).
4+
5+
![](https://www.nuplan.org/static/media/nuPlan_final.3fde7586.png)
6+
7+
## Overview
8+
- [Changelog](#changelog)
9+
- [Teaser release](#teaser-release)
10+
- [Devkit structure](#devkit-structure)
11+
- [Devkit setup](#devkit-setup)
12+
- [Dataset setup](#dataset-setup)
13+
- [Getting started](#getting-started)
14+
- [Known issues](#known-issues)
15+
- [Citation](#citation)
16+
17+
## Changelog
18+
- Dec. 10, 2021: Devkit v0.1.0: Release of the initial teaser dataset (v0.1) and corresponding devkit and maps (v0.1). See [Teaser release](#teaser-release) for more information.
19+
20+
## Teaser release
21+
On Dec. 10 2021 we released the nuPlan teaser dataset and devkit. This is meant to be a **public beta** version.
22+
We are aware of several limitations of the current dataset and devkit.
23+
Nevertheless we have chosen to make this teaser available to the public for early consultation and to receive feedback on how to improve it.
24+
We appreciate your feedback as a [Github issue](https://github.com/motional/nuplan-devkit/issues).
25+
26+
**Note:** All interfaces are subject to change for the full release! No backward compatibility can be guaranteed.
27+
28+
Below is a list of upcoming features for the full release:
29+
- The teaser dataset includes 200h of data from Las Vegas, we will be releasing the full 1500h dataset that also includes data from Singapore, Boston or Pittsburgh in early 2022.
30+
- The full release will also include the sensor data for 150h (10% of the total dataset).
31+
- Localization, perception scenario tags and traffic lights will be improved in future releases.
32+
- The full release will have an improved dashboard, closed-loop training, advanced planning baselines, end-to-end planners, ML smart agents, RL environment, as well as more metrics and scenarios.
33+
34+
## Devkit structure
35+
Our code is organized in these directories:
36+
```
37+
ci - Continuous integration code. Not relevant for average users.
38+
docs - Readmes and other documentation of the repo and dataset.
39+
nuplan - The main source folder.
40+
common - Code shared by `database` and `planning`.
41+
database - The core devkit used to load and render nuPlan dataset and maps.
42+
planning - The stand-alone planning framework for simulation, training and evaluation.
43+
tutorials - Interactive tutorials, see `Getting started`.
44+
```
45+
46+
## Devkit setup
47+
Please refer to the [installation page](https://github.com/motional/nuplan-devkit/blob/master/docs/installation.md) for detailed instructions on how to setup the devkit.
48+
49+
## Dataset setup
50+
To download nuPlan you need to go to the [Download page](https://nuplan.org/nuplan#download),
51+
create an account and agree to the [Terms of Use](https://www.nuplan.org/terms-of-use).
52+
After logging in you will see multiple archives.
53+
For the devkit to work you will need to download *all* archives.
54+
Please unpack the archives to the `~/nuplan/dataset` folder.
55+
Eventually you should have the following folder structure:
56+
```
57+
~/nuplan/dataset - The dataset folder. Can be read-only.
58+
nuplan_v*.db - SQLite database that includes all metadata
59+
maps - Folder for all map files
60+
<missing> - Sensor data will be added in the future
61+
~/nuplan/exp - The experiment and cache folder. Must have read and write access.
62+
```
63+
If you want to use another folder, you can set the corresponding [environment variable](https://github.com/motional/nuplan-devkit/blob/master/docs/installation.md) or specify the `data_root` parameter of the NuPlanDB class (see tutorial).
64+
65+
## Getting started
66+
Please follow these steps to make yourself familiar with the nuScenes dataset:
67+
- Familiarize yourself with the main [features of nuPlan](https://www.nuplan.org) and the [dataset description](https://www.nuplan.org/nuplan).
68+
- Setup the [devkit](#dataset-setup) and [dataset](#dataset-setup) as described above.
69+
- Walk through the tutorials in [this folder](https://github.com/motional/nuplan-devkit/blob/master/tutorials/) or run them yourself using:
70+
```
71+
jupyter notebook ~/nuplan-devkit/tutorials/<filename>.ipynb
72+
```
73+
Replace &lt;filename&gt; with one of the following:
74+
```
75+
- `nuplan_framework.ipynb`: This is the main tutorial for anyone who wants to dive right into ML planning.
76+
It describes how to 1) train an ML planner, 2) simulate it, 3) measure the performance and 4) visualize the results.
77+
```
78+
- Read the [nuPlan paper](https://www.nuplan.org/publications) to understand the details behind the dataset.
79+
80+
## Citation
81+
Please use the following citation when referencing [nuPlan](https://arxiv.org/abs/2106.11810):
82+
```
83+
@INPROCEEDINGS{nuplan,
84+
title={NuPlan: A closed-loop ML-based planning benchmark for autonomous vehicles},
85+
author={H. Caesar, J. Kabzan, K. Tan et al.,},
86+
booktitle={CVPR ADP3 workshop},
87+
year=2021
88+
}
89+
```

WORKSPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
workspace(name = "nuplan_devkit")

0 commit comments

Comments
 (0)