-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update GitHub Actions Workflows #1822
Closed
Closed
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0e4a303
update workflows
saitcakmak b2b6ffe
remove $
saitcakmak 47ff111
add ()
saitcakmak 144a8fa
use single quotes
saitcakmak 20119bb
add missing (
saitcakmak 84c2eba
make minimal dependencies behave as before
saitcakmak a4c792f
Update .github/workflows/reusable_test.yml
saitcakmak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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,31 @@ | ||
name: Nightly Cron with Pinned BoTorch | ||
|
||
on: | ||
schedule: | ||
# midnight EST | ||
- cron: '0 5 * * *' | ||
# allow this to be scheduled manually in addition to cron | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
tests-and-coverage-minimal: | ||
name: Tests with pinned BoTorch & minimal dependencies | ||
uses: ./.github/workflows/reusable_test.yml | ||
with: | ||
pinned_botorch: true | ||
minimal_dependencies: true | ||
|
||
tests-and-coverage-full: | ||
name: Tests with pinned BoTorch & full dependencies | ||
uses: ./.github/workflows/reusable_test.yml | ||
with: | ||
pinned_botorch: true | ||
minimal_dependencies: false | ||
|
||
build-tutorials: | ||
name: Build tutorials with pinned BoTorch | ||
uses: ./.github/workflows/reusable_tutorials.yml | ||
with: | ||
smoke_test: false | ||
pinned_botorch: true |
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
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,65 @@ | ||
name: Reusable Test Workflow | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
pinned_botorch: | ||
required: true | ||
type: boolean | ||
minimal_dependencies: | ||
required: false | ||
type: boolean | ||
default: false | ||
workflow_call: | ||
inputs: | ||
pinned_botorch: | ||
required: true | ||
type: boolean | ||
minimal_dependencies: | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
tests-and-coverage: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10"] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- if: ${{ inputs.pinned_botorch }} | ||
name: Install dependencies with pinned BoTorch (minimal dependencies ${{ inputs.minimal_dependencies }}) | ||
run: | | ||
pip install -e ${{ ((inputs.minimal_dependencies) && '.[unittest_minimal]') || '.[unittest]' }} | ||
saitcakmak marked this conversation as resolved.
Show resolved
Hide resolved
saitcakmak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- if: ${{ !inputs.pinned_botorch }} | ||
name: Install dependencies with latest BoTorch (minimal dependencies ${{ inputs.minimal_dependencies }}) | ||
env: | ||
ALLOW_BOTORCH_LATEST: true | ||
ALLOW_LATEST_GPYTORCH_LINOP: true | ||
run: | | ||
pip install git+https://github.com/cornellius-gp/gpytorch.git | ||
pip install git+https://github.com/pytorch/botorch.git | ||
pip install -e ${{ ((inputs.minimal_dependencies) && '.[unittest_minimal]') || '.[unittest]' }} | ||
|
||
- name: Import Ax | ||
run: | | ||
python scripts/import_ax.py | ||
- if: ${{ !inputs.minimal_dependencies }} | ||
# Only run with full dependencies. Minimal does not include pytest. | ||
name: Tests and coverage | ||
run: | | ||
pytest -ra --cov=ax | ||
- if: ${{ !inputs.minimal_dependencies }} | ||
# Using same condition as above since we need the coverage report for upload. | ||
name: Upload coverage | ||
run: | | ||
bash <(curl -s https://codecov.io/bash) |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we start testing against 3.11 (here and in other places)? Botorch does...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should but this is currently blocked on pytorch/torchx#744