Skip to content

WIP: long-horizon with LLMs #1180

WIP: long-horizon with LLMs

WIP: long-horizon with LLMs #1180

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
types: [opened, synchronize, reopened, ready_for_review]
jobs:
build:
# runs-on: ubuntu-latest
#runs-on: [self-hosted, ubuntu-22.04]
runs-on: self-hosted
if: github.event.pull_request.draft == false
#strategy:
# fail-fast: false
# matrix:
# # TODO: for now I have to comment out the latest version of Python
# # This is because Open3d and scikit-fmm aren't supported on 3.12 yet
# # python-version: ["3.9", "3.10", "3.11", "3.12"]
# # python-version: ["3.9", "3.10", "3.11"]
# python-version: ["3.11"]
# Use pre-built container for stretch AI
container:
image: hellorobotinc/stretch-ai_cuda-11.8:0.0.12
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Configure Git to trust the directory
run: git config --global --add safe.directory `pwd`
- name: Get LFS objects
run: git lfs pull
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies and code
run: |
python -m pip install --upgrade pip
python --version
# Install torch
pip install torch==2.3.1+cpu torchvision==0.18.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
# Install the core package
python -m pip install -e ./src[dev]
# Install the tools for linting and testing
python -m pip install mypy flake8 pytest
## Run pre-commit and try to apply fixes
- name: Set up pre-commit cache
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
- name: Apply fixes from pre-commit
uses: pre-commit-ci/lite-action@v1.0.2
if: always()
- name: Test with pytest
run: |
python -m pip install pytest
cd src/
echo "Running mapping tests"
python -m pytest -vv test/mapping
echo "Running llms tests"
python -m pytest -vv test/llms
echo "Running perception tests"
python -m pytest -vv test/perception
echo "Running utils tests"
python -m pytest -vv test/utils
echo "Running core tests"
python -m pytest -vv test/core
# echo "Running audio tests"
# python -m pytest -vv test/audio