Skip to content

Commit

Permalink
Merge branch 'Thinklab-SJTU:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
heatingma authored Dec 1, 2023
2 parents 086e182 + 14894f9 commit ed731b3
Show file tree
Hide file tree
Showing 398 changed files with 1,266 additions and 1,593 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest. They are divided into two runs because MindSpore will interfer with Paddle.
- name: Test with pytest. They are divided into two runs because MindSpore will interfere with Paddle.
run: |
if [ "${{ matrix.python-version }}" != "3.10" ]; then
pytest --cov=pygmtools --cov-report=xml --backend=mindspore tests/test_classic_solvers.py; fi
Expand All @@ -50,7 +50,7 @@ jobs:

macos:

runs-on: macos-latest
runs-on: macos-12
strategy:
fail-fast: false
matrix:
Expand All @@ -76,13 +76,13 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest. They are divided into two runs because MindSpore will interfer with Paddle.
- name: Test with pytest. They are divided into two runs because MindSpore will interfere with Paddle.
run: |
pytest --cov=pygmtools --cov-report=xml --backend=mindspore tests/test_classic_solvers.py
pytest --cov=pygmtools --cov-report=xml --cov-append
windows:

runs-on: windows-latest
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
Expand All @@ -108,7 +108,7 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest. They are divided into two runs because MindSpore will interfer with Paddle.
- name: Test with pytest. They are divided into two runs because MindSpore will interfere with Paddle.
run: |
pytest --cov=pygmtools --cov-report=xml --backend=mindspore tests/test_classic_solvers.py
pytest --cov=pygmtools --cov-report=xml --cov-append
pytest --cov=pygmtools --cov-report=xml --cov-append
11 changes: 6 additions & 5 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand All @@ -27,6 +27,7 @@ jobs:
python -m pip install --upgrade pip
pip install wheel
pip install cython
pip install setuptools
- name: Build package
run: python setup.py sdist
- name: Upload new version to PyPI
Expand All @@ -40,7 +41,7 @@ jobs:

linux:
needs: deploy
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand All @@ -55,7 +56,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/publish_req.txt
pip install -r pygmtools/publish_requirements.txt
- name: Build Wheel
run: |
python setup.py bdist_wheel
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/publish_req.txt
pip install -r pygmtools/publish_requirements.txt
- name: Build Wheel
run: |
python setup.py bdist_wheel
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/publish_req.txt
pip install -r pygmtools/publish_requirements.txt
- name: Build Wheel
run: |
python setup.py bdist_wheel
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ The following backends are available:

<img src="https://pygmtools.readthedocs.io/en/latest/_images/tensorflow_logo.png" alt="tensorflow logo" width="200"/>

### Development status (0.4.1)
### Development status (0.4.2)

| | Numpy | PyTorch | Jittor | PaddlePaddle | Tensorflow | MindSpore |
| ------------------- | ----- | ------- | ------ | ------------ | ---------- | --------- |
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -44,7 +33,7 @@
},
"outputs": [],
"source": [
"import jittor as jt # jittor backend\nimport pygmtools as pygm\nimport matplotlib.pyplot as plt # for plotting\nfrom matplotlib.patches import ConnectionPatch # for plotting matching result\nimport networkx as nx # for plotting graphs\npygm.BACKEND = 'jittor' # set default backend for pygmtools\n_ = jt.set_seed(1) # fix random seed\n\njt.flags.use_cuda = jt.has_cuda"
"import jittor as jt # jittor backend\nimport pygmtools as pygm\nimport matplotlib.pyplot as plt # for plotting\nfrom matplotlib.patches import ConnectionPatch # for plotting matching result\nimport networkx as nx # for plotting graphs\npygm.set_backend('jittor') # set default backend for pygmtools\n_ = jt.set_seed(1) # fix random seed"
]
},
{
Expand Down Expand Up @@ -352,7 +341,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@
import matplotlib.pyplot as plt # for plotting
from matplotlib.patches import ConnectionPatch # for plotting matching result
import networkx as nx # for plotting graphs
pygm.BACKEND = 'jittor' # set default backend for pygmtools
pygm.set_backend('jittor') # set default backend for pygmtools
_ = jt.set_seed(1) # fix random seed

jt.flags.use_cuda = jt.has_cuda

##############################################################################
# Generate two isomorphic graphs
# ------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2f0f2c7c1ef1f5fe8b1c9e88301ef680
15ad629c0cbb43ce3f92bbbb2c5ef270
Loading

0 comments on commit ed731b3

Please sign in to comment.