Skip to content
Merged
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
96 changes: 96 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: "🐛 Bug report"
description: Report errors or unexpected behavior
title: "[Bug]: "
labels: ["type/bug", "triage-needed"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report, please make sure to [search for existing issues](https://github.com/InternRobotics/InternUtopia/issues) before filing a new one!

- type: textarea
id: bug-description
attributes:
label: Bug Description
placeholder: |
A clear and concise description of what the bug is.
Try to isolate the issue to help the community to reproduce it easily and increase chances for a fast fix.
validations:
required: true

- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
placeholder: |
Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.

<!-- Please post terminal logs, minimal example to reproduce, or command to run under three backticks (```) to allow code formatting.

```
Paste your error here
```

For more information on this, check: https://www.markdownguide.org/extended-syntax/#fenced-code-blocks

-->
value: |
Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.

<!-- Please post terminal logs, minimal example to reproduce, or command to run under three backticks (```) to allow code formatting.

```
Paste your error here
```

For more information on this, check: https://www.markdownguide.org/extended-syntax/#fenced-code-blocks

-->
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
placeholder: "A clear and concise description of what you expected to happen."
validations:
required: true

- type: textarea
id: screenshots-videos
attributes:
label: Screenshots/Videos
placeholder: "If applicable, add screenshots and/or a video to help explain your problem."

- type: textarea
id: desktop-device
attributes:
label: Environment
placeholder: |
- OS: [e.g. Ubuntu 22.04]
- GPU/CPU [e.g. A100, RTX 4090, i9-14900K]
- GPU-driver version
value: |
- OS: [e.g. Ubuntu 22.04]
- GPU/CPU [e.g. A100, RTX 4090, i9-14900K]
- GPU-driver version
validations:
required: true

- type: textarea
id: version
attributes:
label: Release version or Commit ID
placeholder: |
Please provide:
- a) **version number** of the release causing the issue, OR
- b) **SHA/hash** of the latest commit if working from git. You can get this by running the `git rev-parse HEAD` command on your current branch.
validations:
required: true

- type: textarea
id: additional-context
attributes:
label: Additional Context
placeholder: "Add any other context about the problem here."
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/2-enhancement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "🚀 Enhancement"
description: Suggest a new feature request or improvement on the project
title: '[Enhancement]: '
labels:
- type/enhancement
- triage-needed

body:
- type: markdown
attributes:
value: |
A clear and concise description of what new feature or behavior you would like to see. If applicable, please describe the current behavior as well.

- type: textarea
id: suggestion
attributes:
label: What feature or enhancement are you proposing?
validations:
required: true

- type: textarea
id: motivation
attributes:
label: Motivation
description: What is your motivation for adding / enhancing this feature, optimally described in the form of a concrete user story or use case.
value: |
<!-- Please outline the motivation for the proposal. Summarize the core use cases and user problems and needs you are trying to solve.

Is your feature request related to a problem? e.g.,"I'm always frustrated when [...]".

If this is related to another GitHub issue, please link here too. -->
validations:
required: false

- type: textarea
id: additionalinfo
attributes:
label: Additional information
description: If you think that any additional information would be useful please provide them here.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/3-question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "🙏 Question"
description: Ask a question
title: "[Question]: "
labels: ["type/question", "triage-needed"]
body:
- type: markdown
attributes:
value: |
Please make sure to [search for existing issues](https://github.com/InternRobotics/InternUtopia/issues) before filing a new one!

- type: textarea
attributes:
label: Question
description: Describe your question in detail.
validations:
required: true
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: PR CI

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: [ main, master, develop ]
paths-ignore:
- '**.md'
- 'docs/**'

concurrency:
group: pr-${{ github.event.pull_request.number }}-${{ github.workflow }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
runs-on: self-hosted
if: ${{ github.event.pull_request.draft == false }} # no test on draft

strategy:
fail-fast: false
matrix:
python-version: ['3.10']
os: [linux]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Run pre-commit on diff only
if: ${{ github.event_name == 'pull_request' }}
shell: bash -l {0}
run: |
export PATH=/root/miniconda3/bin:$PATH
source /root/miniconda3/etc/profile.d/conda.sh
conda activate internutopia

git fetch origin ${{ github.base_ref }}
pre-commit run --from-ref origin/${{ github.base_ref }} --to-ref HEAD

- name: Run tests
shell: bash -l {0}
run: |
# conda
export PATH=/root/miniconda3/bin:$PATH
source /root/miniconda3/etc/profile.d/conda.sh
conda activate internutopia

# link data
mkdir data
ln -s /cpfs/user/wangyukai/mp3d_data/vln_pe data/vln_pe
ln -s /cpfs/user/wangyukai/mp3d_data/Embodiments data/Embodiments
ln -s /cpfs/user/wangyukai/mp3d_data/scene_data data/scene_data
ln -s /cpfs/user/wangyukai/checkpoints checkpoints

# run tests
/root/miniconda3/envs/internutopia/bin/python -c "import torch,sys;print(sys.executable);print('cuda:',torch.cuda.is_available())"
/root/miniconda3/envs/internutopia/bin/python -m pytest -q -W ignore --timeout=900 --timeout-method=signal
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,5 @@ logs/
*.png
*.ckpt
/results/
checkpoints
checkpoints
internnav/model/basemodel/LongCLIP/
2 changes: 2 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
[submodule "internnav/model/basemodel/LongCLIP"]
path = internnav/model/basemodel/LongCLIP
url = https://github.com/beichenzbc/Long-CLIP
commit = 3966af9ae9331666309a22128468b734db4672a7
ignore = untracked
57 changes: 3 additions & 54 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
exclude: |
^internnav/model/basemodel/LongCLIP/

repos:
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.0
Expand Down Expand Up @@ -26,69 +29,15 @@ repos:
rev: v2.2.1
hooks:
- id: codespell
exclude: |
(?x)(
^toolkits/grscenes_scripts/README.md|
^toolkits/indoor_scenes_generation/infinigen/infinigen_examples/constraints
)
# - repo: https://github.com/gitleaks/gitleaks
# rev: v8.24.0
# hooks:
# - id: gitleaks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
exclude: '^(.*/lcmtypes/.*)'
- id: requirements-txt-fixer
- id: double-quote-string-fixer
exclude: '^(.*/lcmtypes/.*)'
- id: check-merge-conflict
- id: fix-encoding-pragma
args: ["--remove"]
- id: mixed-line-ending
args: ["--fix=lf"]

# - repo: https://github.com/PyCQA/isort
# rev: 5.11.5
# hooks:
# - id: isort
# - repo: https://github.com/psf/black
# rev: 22.10.0
# hooks:
# - id: black
# args: [--line-length=79]
# - repo: https://github.com/PyCQA/flake8
# rev: 4.0.1
# hooks:
# - id: flake8
# - repo: https://github.com/codespell-project/codespell
# rev: v2.2.1
# hooks:
# - id: codespell
# exclude: |
# (?x)(
# ^toolkits/grscenes_scripts/README.md|
# ^toolkits/indoor_scenes_generation/infinigen/infinigen_examples/constraints
# )
# - repo: https://github.com/gitleaks/gitleaks
# rev: v8.24.0
# hooks:
# - id: gitleaks
# - repo: https://github.com/pre-commit/pre-commit-hooks
# rev: v3.1.0
# hooks:
# - id: trailing-whitespace
# - id: check-yaml
# - id: end-of-file-fixer
# exclude: '^(.*/lcmtypes/.*)'
# - id: requirements-txt-fixer
# - id: double-quote-string-fixer
# exclude: '^(.*/lcmtypes/.*)'
# - id: check-merge-conflict
# - id: fix-encoding-pragma
# args: ["--remove"]
# - id: mixed-line-ending
# args: ["--fix=lf"]
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,13 @@ lcmtypes
[tool.isort]
profile = "black"
skip_glob = '**/lcmtypes/**'

[tool.pytest.ini_options]
testpaths = [
"tests"
]
addopts = "-ra --color=yes --maxfail=1"
markers = [
"slow: marks tests as slow",
"gpu: requires GPU"
]
2 changes: 0 additions & 2 deletions requirements/agent.txt

This file was deleted.

4 changes: 2 additions & 2 deletions requirements/eval.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ansi2txt==0.2.0
pydantic>2.0
requests
ansi2txt
requests==2.32.3
5 changes: 5 additions & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
coverage==7.5.4
pytest==7.3.1
pytest-cov==4.1.0
pytest-timeout==2.4.0
tomli==2.0.1
28 changes: 28 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import pytest


@pytest.fixture
def tmp_cfg(tmp_path):
p = tmp_path / "config.yaml"
p.write_text("hello: world\n")
return p


# global hook: skip mark
def pytest_runtest_setup(item):
if "gpu" in item.keywords:
try:
import torch

if not torch.cuda.is_available():
pytest.skip("No CUDA for gpu-marked test")
except Exception:
pytest.skip("Torch not available")
if "ray" in item.keywords:
try:
import ray

ray.init()
assert ray.is_initialized()
except Exception:
pytest.skip("ray not available")
Loading