Skip to content

Commit

Permalink
set up conda ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cccvs committed Apr 9, 2024
1 parent 3ccb6e5 commit 640cb5f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: bluefoglite
- name: Install BlueFogLite
run: |
conda install pip
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install networkx
python -c "import networkx"
python -m pip install .
cat tools/requirements_dev.txt | grep pytest | xargs pip install
- name: Unit Test
Expand All @@ -88,19 +89,19 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: bluefoglite
- name: Install brew coreutils
run: brew install coreutils # for timeout command
- name: Install BlueFogLite
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install networkx
python3 -c "import networkx"
python3 -m pip install .
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install .
cat tools/requirements_dev.txt | grep pytest | xargs pip install
- name: Unit Test
run: |
Expand Down
4 changes: 2 additions & 2 deletions example/torch_cifar10.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def test(epoch):
profiler.disable()
# redirect to ./output_static.txt or ./output_dynamic.txt
with open(
f"output/{'static' if args.disable_dynamic_topology else 'dynamic'}_np{bfl.size()}_topo{args.topology}.txt",
f"output/cp_{'static' if args.disable_dynamic_topology else 'dynamic'}_np{bfl.size()}_{args.topology}.txt",
"w",
) as file:
stats = pstats.Stats(profiler, stream=file).sort_stats("tottime")
Expand All @@ -337,7 +337,7 @@ def test(epoch):
train(0)
# redirect to ./output_static.txt or ./output_dynamic.txt
with open(
f"output/{'static' if args.disable_dynamic_topology else 'dynamic'}_np{bfl.size()}_topo{args.topology}.txt",
f"output/tp_{'static' if args.disable_dynamic_topology else 'dynamic'}_np{bfl.size()}_{args.topology}.txt",
"w",
) as file:
with contextlib.redirect_stdout(file):
Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
torch==2.1.0
torchvision==0.16.0
torchaudio==2.1.0
networkx==2.8.8
numpy==1.24.1
protobuf==3.19.4
torch
torchvision
torchaudio
networkx<3.0
numpy
protobuf

0 comments on commit 640cb5f

Please sign in to comment.