Skip to content

Commit 015efce

Browse files
authored
[Fix] CI Pipeline and Code Style Improvements (#52)
* fix style * [Fix] CI is ready for style check on github * test * fix ci * fix origin * fix codespell * test * 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 * fix issue * fix comments * add timeout in ci * add timeout in ci
1 parent 8d2f127 commit 015efce

File tree

18 files changed

+651
-59
lines changed

18 files changed

+651
-59
lines changed

.github/ISSUE_TEMPLATE/1-bug.yml

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: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: PR CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
branches: [ main, master, develop ]
7+
paths-ignore:
8+
- '**.md'
9+
- 'docs/**'
10+
11+
concurrency:
12+
group: pr-${{ github.event.pull_request.number }}-${{ github.workflow }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
test:
20+
runs-on: self-hosted
21+
if: ${{ github.event.pull_request.draft == false }} # no test on draft
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
python-version: ['3.10']
27+
os: [linux]
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
submodules: recursive
35+
36+
- name: Set up Python ${{ matrix.python-version }}
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
41+
- name: Run pre-commit on diff only
42+
if: ${{ github.event_name == 'pull_request' }}
43+
shell: bash -l {0}
44+
run: |
45+
export PATH=/root/miniconda3/bin:$PATH
46+
source /root/miniconda3/etc/profile.d/conda.sh
47+
conda activate internutopia
48+
49+
git fetch origin ${{ github.base_ref }}
50+
pre-commit run --from-ref origin/${{ github.base_ref }} --to-ref HEAD
51+
52+
- name: Run tests
53+
shell: bash -l {0}
54+
run: |
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 --timeout=900 --timeout-method=signal

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,5 @@ logs/
148148
*.png
149149
*.ckpt
150150
/results/
151-
checkpoints
151+
checkpoints
152+
internnav/model/basemodel/LongCLIP/

.gitmodules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +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
9+
ignore = untracked

.pre-commit-config.yaml

Lines changed: 3 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
exclude: |
2+
^internnav/model/basemodel/LongCLIP/
3+
14
repos:
25
- repo: https://github.com/PyCQA/autoflake
36
rev: v2.2.0
@@ -26,69 +29,15 @@ repos:
2629
rev: v2.2.1
2730
hooks:
2831
- id: codespell
29-
exclude: |
30-
(?x)(
31-
^toolkits/grscenes_scripts/README.md|
32-
^toolkits/indoor_scenes_generation/infinigen/infinigen_examples/constraints
33-
)
34-
# - repo: https://github.com/gitleaks/gitleaks
35-
# rev: v8.24.0
36-
# hooks:
37-
# - id: gitleaks
3832
- repo: https://github.com/pre-commit/pre-commit-hooks
3933
rev: v3.1.0
4034
hooks:
4135
- id: trailing-whitespace
4236
- id: check-yaml
4337
- id: end-of-file-fixer
44-
exclude: '^(.*/lcmtypes/.*)'
4538
- id: requirements-txt-fixer
46-
- id: double-quote-string-fixer
47-
exclude: '^(.*/lcmtypes/.*)'
4839
- id: check-merge-conflict
4940
- id: fix-encoding-pragma
5041
args: ["--remove"]
5142
- id: mixed-line-ending
5243
args: ["--fix=lf"]
53-
54-
# - repo: https://github.com/PyCQA/isort
55-
# rev: 5.11.5
56-
# hooks:
57-
# - id: isort
58-
# - repo: https://github.com/psf/black
59-
# rev: 22.10.0
60-
# hooks:
61-
# - id: black
62-
# args: [--line-length=79]
63-
# - repo: https://github.com/PyCQA/flake8
64-
# rev: 4.0.1
65-
# hooks:
66-
# - id: flake8
67-
# - repo: https://github.com/codespell-project/codespell
68-
# rev: v2.2.1
69-
# hooks:
70-
# - id: codespell
71-
# exclude: |
72-
# (?x)(
73-
# ^toolkits/grscenes_scripts/README.md|
74-
# ^toolkits/indoor_scenes_generation/infinigen/infinigen_examples/constraints
75-
# )
76-
# - repo: https://github.com/gitleaks/gitleaks
77-
# rev: v8.24.0
78-
# hooks:
79-
# - id: gitleaks
80-
# - repo: https://github.com/pre-commit/pre-commit-hooks
81-
# rev: v3.1.0
82-
# hooks:
83-
# - id: trailing-whitespace
84-
# - id: check-yaml
85-
# - id: end-of-file-fixer
86-
# exclude: '^(.*/lcmtypes/.*)'
87-
# - id: requirements-txt-fixer
88-
# - id: double-quote-string-fixer
89-
# exclude: '^(.*/lcmtypes/.*)'
90-
# - id: check-merge-conflict
91-
# - id: fix-encoding-pragma
92-
# args: ["--remove"]
93-
# - id: mixed-line-ending
94-
# args: ["--fix=lf"]

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,13 @@ lcmtypes
88
[tool.isort]
99
profile = "black"
1010
skip_glob = '**/lcmtypes/**'
11+
12+
[tool.pytest.ini_options]
13+
testpaths = [
14+
"tests"
15+
]
16+
addopts = "-ra --color=yes --maxfail=1"
17+
markers = [
18+
"slow: marks tests as slow",
19+
"gpu: requires GPU"
20+
]

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

0 commit comments

Comments
 (0)