Ensure TopKEncoder has correct outputs when model is saved #3449
Workflow file for this run
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
name: lightfm | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
check-changes: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install GitPython | |
pip install . --no-deps | |
- name: Get changed backends | |
id: backend_check | |
run: | | |
echo "changed=$(python ci/get_changed_backends.py --backend lightfm --branch ${{github.base_ref}})" >> "$GITHUB_OUTPUT" | |
outputs: | |
needs_testing: ${{ steps.backend_check.outputs.changed }} | |
tests: | |
needs: check-changes | |
if: ${{needs.check-changes.outputs.needs_testing == 'true' || github.ref == 'refs/heads/main'}} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [3.8] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
cache-dependency-path: "requirements/dev.txt" | |
- name: Install Ubuntu packages | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y protobuf-compiler | |
- name: Get Branch name | |
id: get-branch-name | |
uses: NVIDIA-Merlin/.github/actions/branch-name@main | |
- name: Install Merlin dependencies | |
run: | | |
merlin_branch="${{ steps.get-branch-name.outputs.branch }}" | |
pip install "NVTabular@git+https://github.com/NVIDIA-Merlin/NVTabular.git@$merlin_branch" | |
pip install "merlin-core@git+https://github.com/NVIDIA-Merlin/core.git@$merlin_branch" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
python -m pip install .[lightfm-dev] | |
- name: Build | |
run: | | |
python setup.py develop | |
- name: Run unittests | |
run: | | |
if [[ "${{ github.ref }}" == 'refs/heads/main' ]]; then | |
make tests-lightfm | |
else | |
make tests-lightfm-changed | |
fi |