-
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.
Conditionally add tensorflow dependent primitives to top level primit…
…ives (#105) * conditionally add USE to top level primitives * check for both tensorflow and tensorflow_hub * conditionally import both elmo and use * test USE primitive in list_primitives * fix indent * Create optional_primitive_test.yml * Update names of new CI tests
- Loading branch information
Showing
3 changed files
with
55 additions
and
2 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,43 @@ | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
push: | ||
branches: | ||
- main | ||
|
||
name: Optional Primitive Test | ||
jobs: | ||
optional_primitive_test: | ||
name: Python ${{ matrix.python_version }} - Featuretools ${{ matrix.featuretools_version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python_version: ["3.7", "3.8", "3.9"] | ||
featuretools_version: ["Release", "Main"] | ||
steps: | ||
- name: Set up python ${{ matrix.python_version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
- name: Install standard requirements | ||
run: | | ||
pip config --site set global.progress_bar off | ||
make installdeps | ||
- if: ${{ matrix.featuretools_version == 'Main' }} | ||
name: Install latest version of Featuretools from main branch | ||
run: pip install git+https://github.com/alteryx/featuretools.git@main#egg=featuretools --force-reinstall | ||
- name: Test optional primitives are not imported | ||
run: python -c "import nlp_primitives; assert all(p not in dir(nlp_primitives) for p in ('Elmo', 'UniversalSentenceEncoder'))" | ||
- name: Install complete requirements | ||
run: make installdeps-complete | ||
- if: ${{ matrix.featuretools_version == 'Main' }} | ||
name: Install latest version of Featuretools from main branch | ||
run: pip install git+https://github.com/alteryx/featuretools.git@main#egg=featuretools --force-reinstall | ||
- name: Test optional primitives are imported | ||
run: python -c "import nlp_primitives; assert all(p in dir(nlp_primitives) for p in ('Elmo', 'UniversalSentenceEncoder'))" |
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