Skip to content

Introduce use_sync_collectives configuration (#2010) #1479

Introduce use_sync_collectives configuration (#2010)

Introduce use_sync_collectives configuration (#2010) #1479

Workflow file for this run

# This workflow builds the torchrec docs and deploys them to gh-pages.
name: Generate documentation
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build_docs_job:
runs-on: ${{ matrix.os }}
permissions:
# Grant write permission here so that the doc can be pushed to gh-pages branch
contents: write
strategy:
matrix:
include:
- os: linux.2xlarge
python-version: 3.8
steps:
- name: Check ldd --version
run: ldd --version
- name: Checkout
uses: actions/checkout@v2
# Update references
- name: Update pip
run: |
sudo yum update -y
sudo yum -y install git python3-pip
sudo pip3 install --upgrade pip
- name: Setup conda
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda
- name: setup Path
run: |
echo "/home/ec2-user/miniconda/bin" >> $GITHUB_PATH
echo "CONDA=/home/ec2-user/miniconda" >> $GITHUB_PATH
- name: create conda env
run: |
conda create --name build_binary python=${{ matrix.python-version }}
conda info
- name: check python version no Conda
run: |
python --version
- name: check python version
run: |
conda run -n build_binary python --version
- name: Install gcc
shell: bash
run: |
sudo yum group install -y "Development Tools"
- name: setup Path
run: |
echo /usr/local/bin >> $GITHUB_PATH
- name: Install PyTorch
shell: bash
run: |
conda install -n build_binary --yes pytorch cpuonly -c pytorch-nightly
- name: Install fbgemm
run: |
conda run -n build_binary pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu
- name: Install torchmetrics
run: |
conda run -n build_binary pip install torchmetrics==1.0.3
- name: Install TorchRec
run: |
conda run -n build_binary pip install torchrec --index-url https://download.pytorch.org/whl/nightly/cpu
- name: Test fbgemm_gpu and torchrec installation
shell: bash
run: |
conda run -n build_binary \
python -c "import fbgemm_gpu"
conda run -n build_binary \
python -c "import torchrec"
- name: Build the docset
run: |
conda run -n build_binary python -m pip install -r docs/requirements.txt
cd ./docs
conda run -n build_binary make html
cd ..
- name: Get output time
run: echo "The time was ${{ steps.build.outputs.time }}"
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/build/html # The folder the action should deploy.