-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from Acellera/ci
Ci
- Loading branch information
Showing
5 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest pytest-cov hydra-core tqdm torch torchvision MolScore promptsmiles | ||
|
||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
|
||
pip install torchrl | ||
|
||
cd ../acegen-open | ||
pip install -e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest pytest-cov hydra-core tqdm torch torchvision, MolScore, promptsmiles | ||
|
||
pip install torchrl | ||
|
||
cd ../acegen-open | ||
pip install -e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest pytest-cov hydra-core tqdm | ||
|
||
# Not using nightly torch, MolScore, promptsmiles | ||
python -m pip install torch torchvision MolScore promptsmiles | ||
# python -m pip install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu --force-reinstall | ||
|
||
cd ../acegen-open | ||
pip install -e . | ||
pip uninstall --yes torchrl | ||
pip uninstall --yes tensordict | ||
|
||
cd .. | ||
python -m pip install git+https://github.com/pytorch-labs/tensordict.git | ||
git clone https://github.com/pytorch/rl.git | ||
cd rl | ||
python setup.py develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch , "main" ] | ||
pull_request: | ||
branches: [ $default-branch , "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Lint | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pre-commit | ||
set +e | ||
pre-commit run --all-files | ||
if [ $? -ne 0 ]; then | ||
git --no-pager diff | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: unit_tests | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch , "main" ] | ||
pull_request: | ||
branches: [ $default-branch , "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10","3.11"] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
bash .github/unittest/install_dependencies_nightly.sh | ||
- name: Test with pytest | ||
run: | | ||
pytest test/ --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html | ||
- if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' | ||
name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: false |