Skip to content

Commit 289a1e3

Browse files
authored
add tests; add ray test; add ISSUE_TEMPLATE; remove duplicate requirements; Add runner ci;
* update test; add ray test * update self hosted * update ci * update ci * update ci * update ci * update ci * update * update ci; add issue template * update ci * update ci * update ci * fix server hang * fix server hang * fix server hang * fix server hang * update ci and test * update ci and test * update ci and test * Revert "update ci and test" This reverts commit 3543494. * fix * fix server
1 parent 4b9d98e commit 289a1e3

13 files changed

Lines changed: 376 additions & 32 deletions

File tree

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: "🐛 Bug report"
2+
description: Report errors or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["type/bug", "triage-needed"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
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!
10+
11+
- type: textarea
12+
id: bug-description
13+
attributes:
14+
label: Bug Description
15+
placeholder: |
16+
A clear and concise description of what the bug is.
17+
Try to isolate the issue to help the community to reproduce it easily and increase chances for a fast fix.
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: steps-to-reproduce
23+
attributes:
24+
label: Steps to Reproduce
25+
placeholder: |
26+
Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.
27+
28+
<!-- Please post terminal logs, minimal example to reproduce, or command to run under three backticks (```) to allow code formatting.
29+
30+
```
31+
Paste your error here
32+
```
33+
34+
For more information on this, check: https://www.markdownguide.org/extended-syntax/#fenced-code-blocks
35+
36+
-->
37+
value: |
38+
Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.
39+
40+
<!-- Please post terminal logs, minimal example to reproduce, or command to run under three backticks (```) to allow code formatting.
41+
42+
```
43+
Paste your error here
44+
```
45+
46+
For more information on this, check: https://www.markdownguide.org/extended-syntax/#fenced-code-blocks
47+
48+
-->
49+
validations:
50+
required: true
51+
52+
- type: textarea
53+
id: expected-behavior
54+
attributes:
55+
label: Expected Behavior
56+
placeholder: "A clear and concise description of what you expected to happen."
57+
validations:
58+
required: true
59+
60+
- type: textarea
61+
id: screenshots-videos
62+
attributes:
63+
label: Screenshots/Videos
64+
placeholder: "If applicable, add screenshots and/or a video to help explain your problem."
65+
66+
- type: textarea
67+
id: desktop-device
68+
attributes:
69+
label: Environment
70+
placeholder: |
71+
- OS: [e.g. Ubuntu 22.04]
72+
- GPU/CPU [e.g. A100, RTX 4090, i9-14900K]
73+
- GPU-driver version
74+
value: |
75+
- OS: [e.g. Ubuntu 22.04]
76+
- GPU/CPU [e.g. A100, RTX 4090, i9-14900K]
77+
- GPU-driver version
78+
validations:
79+
required: true
80+
81+
- type: textarea
82+
id: version
83+
attributes:
84+
label: Release version or Commit ID
85+
placeholder: |
86+
Please provide:
87+
- a) **version number** of the release causing the issue, OR
88+
- 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.
89+
validations:
90+
required: true
91+
92+
- type: textarea
93+
id: additional-context
94+
attributes:
95+
label: Additional Context
96+
placeholder: "Add any other context about the problem here."
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "🚀 Enhancement"
2+
description: Suggest a new feature request or improvement on the project
3+
title: '[Enhancement]: '
4+
labels:
5+
- type/enhancement
6+
- triage-needed
7+
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
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.
13+
14+
- type: textarea
15+
id: suggestion
16+
attributes:
17+
label: What feature or enhancement are you proposing?
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: motivation
23+
attributes:
24+
label: Motivation
25+
description: What is your motivation for adding / enhancing this feature, optimally described in the form of a concrete user story or use case.
26+
value: |
27+
<!-- Please outline the motivation for the proposal. Summarize the core use cases and user problems and needs you are trying to solve.
28+
29+
Is your feature request related to a problem? e.g.,"I'm always frustrated when [...]".
30+
31+
If this is related to another GitHub issue, please link here too. -->
32+
validations:
33+
required: false
34+
35+
- type: textarea
36+
id: additionalinfo
37+
attributes:
38+
label: Additional information
39+
description: If you think that any additional information would be useful please provide them here.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "🙏 Question"
2+
description: Ask a question
3+
title: "[Question]: "
4+
labels: ["type/question", "triage-needed"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Please make sure to [search for existing issues](https://github.com/InternRobotics/InternUtopia/issues) before filing a new one!
10+
11+
- type: textarea
12+
attributes:
13+
label: Question
14+
description: Describe your question in detail.
15+
validations:
16+
required: true

.github/workflows/ci.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ permissions:
1717

1818
jobs:
1919
test:
20-
# 如果你只用 GitHub 托管 runner:
21-
runs-on: ubuntu-latest
22-
if: ${{ github.event.pull_request.draft == false }} # 草稿 PR 不跑
20+
runs-on: self-hosted
21+
if: ${{ github.event.pull_request.draft == false }} # no test on draft
2322

2423
strategy:
2524
fail-fast: false
2625
matrix:
2726
python-version: ['3.10']
28-
os: [ubuntu-latest]
27+
os: [linux]
2928

3029
steps:
3130
- name: Checkout
@@ -39,30 +38,32 @@ jobs:
3938
with:
4039
python-version: ${{ matrix.python-version }}
4140

42-
- name: Cache pip
43-
uses: actions/cache@v4
44-
with:
45-
path: ~/.cache/pip
46-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
47-
restore-keys: |
48-
${{ runner.os }}-pip-${{ matrix.python-version }}-
49-
50-
- name: Install deps
51-
run: |
52-
python -m pip install --upgrade pip
53-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
54-
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
55-
56-
- name: Install pre-commit
57-
run: pip install pre-commit
58-
5941
- name: Run pre-commit on diff only
6042
if: ${{ github.event_name == 'pull_request' }}
43+
shell: bash -l {0}
6144
run: |
45+
export PATH=/root/miniconda3/bin:$PATH
46+
source /root/miniconda3/etc/profile.d/conda.sh
47+
conda activate internutopia
48+
6249
git fetch origin ${{ github.base_ref }}
6350
pre-commit run --from-ref origin/${{ github.base_ref }} --to-ref HEAD
6451
6552
- name: Run tests
53+
shell: bash -l {0}
6654
run: |
67-
pip install pytest
68-
# pytest -q -W ignore
55+
# conda
56+
export PATH=/root/miniconda3/bin:$PATH
57+
source /root/miniconda3/etc/profile.d/conda.sh
58+
conda activate internutopia
59+
60+
# link data
61+
mkdir data
62+
ln -s /cpfs/user/wangyukai/mp3d_data/vln_pe data/vln_pe
63+
ln -s /cpfs/user/wangyukai/mp3d_data/Embodiments data/Embodiments
64+
ln -s /cpfs/user/wangyukai/mp3d_data/scene_data data/scene_data
65+
ln -s /cpfs/user/wangyukai/checkpoints checkpoints
66+
67+
# run tests
68+
/root/miniconda3/envs/internutopia/bin/python -c "import torch,sys;print(sys.executable);print('cuda:',torch.cuda.is_available())"
69+
/root/miniconda3/envs/internutopia/bin/python -m pytest -q -W ignore

.gitmodules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
[submodule "internnav/model/basemodel/LongCLIP"]
66
path = internnav/model/basemodel/LongCLIP
77
url = https://github.com/beichenzbc/Long-CLIP
8+
commit = 3966af9ae9331666309a22128468b734db4672a7
89
ignore = untracked

requirements/agent.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

requirements/eval.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
ansi2txt==0.2.0
12
pydantic>2.0
2-
requests
3-
ansi2txt
3+
requests==2.32.3

requirements/test.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
coverage==7.5.4
12
pytest==7.3.1
2-
pytest-cov==4.0.0
3+
pytest-cov==4.1.0
4+
tomli==2.0.1

tests/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,11 @@ def pytest_runtest_setup(item):
1818
pytest.skip("No CUDA for gpu-marked test")
1919
except Exception:
2020
pytest.skip("Torch not available")
21+
if "ray" in item.keywords:
22+
try:
23+
import ray
24+
25+
ray.init()
26+
assert ray.is_initialized()
27+
except Exception:
28+
pytest.skip("ray not available")

tests/function_test/e2e_test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,19 @@ def teardown_function(function):
4848
""" """""" """""" """""" """""" """""" """""" """"""
4949

5050

51+
@pytest.mark.cpu
52+
def test_server():
53+
start_command = 'python ./tests/function_test/test_server.py'
54+
common_body(start_command)
55+
56+
5157
@pytest.mark.gpu
5258
def test_challenge():
5359
start_command = 'python ./tests/function_test/test_challenge.py'
5460
common_body(start_command)
61+
62+
63+
@pytest.mark.ray
64+
def test_challenge_ray():
65+
start_command = 'python ./tests/function_test/test_challenge_ray.py'
66+
common_body(start_command)

0 commit comments

Comments
 (0)