Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try add astar in classic_solvers.py; add some functions in utils.py to support NetworkX and GraphML formats #63

Merged
merged 60 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5bb6004
try add a_star
heatingma Jul 11, 2023
06df3a5
Removed a_ Star.tar.gz, modified to compile before testing
heatingma Jul 13, 2023
b16ece1
change tests to test
heatingma Jul 13, 2023
afe1158
add python3
heatingma Jul 13, 2023
39a5f91
fix the path problem
heatingma Jul 13, 2023
9887843
add cython
heatingma Jul 13, 2023
b7cc17a
from a_star import a_star
heatingma Jul 13, 2023
1a72cb2
change A_star to a_star
heatingma Jul 13, 2023
816670e
add a_star
heatingma Jul 17, 2023
efa3ad2
Modified input parameters, added channel and use_net
heatingma Jul 17, 2023
1f61b36
delete the parameter "histogram","diffpool"
heatingma Jul 17, 2023
bedcd26
delete the parameter "histogram","diffpool"
heatingma Jul 17, 2023
faf8961
Add an empty line at the file ending.
heatingma Jul 17, 2023
5f1a518
add test_astar
heatingma Jul 17, 2023
aa226c2
Modified a_star related parameters
heatingma Jul 18, 2023
7cd3511
To quickly detect a_star, after the detection is completed, it needs …
heatingma Jul 18, 2023
5d5d0ea
add beam_width, trustfact, no_pred_size,
heatingma Jul 18, 2023
54d60b9
change a_star to astar
heatingma Jul 18, 2023
0f89a53
Restore all tests
heatingma Jul 18, 2023
0157fea
Update test_classic_solvers.py
heatingma Jul 18, 2023
41e2376
restore all tests in classic solvers
heatingma Jul 18, 2023
7e8f982
Delete auto_examples_jupyter.zip
heatingma Jul 18, 2023
83ed709
Delete auto_examples_python.zip
heatingma Jul 18, 2023
5841866
add non-batch input test
heatingma Jul 18, 2023
0862a05
Restore to the original index.rst
heatingma Jul 18, 2023
50e509b
Modified the Astar document
heatingma Jul 18, 2023
421de06
delete pdb
heatingma Jul 18, 2023
5479db9
add graph1.graphml as example
heatingma Jul 18, 2023
5dbbc9c
add graph2.graphml as example
heatingma Jul 18, 2023
e3ebf1d
add some functions to support NetworkX and GraphML formats
heatingma Jul 18, 2023
f0610f3
delete some unused notes
heatingma Jul 25, 2023
895ddd1
change images to graphs and delete some blank rows
heatingma Jul 25, 2023
378deb3
Revised some formatting issues
heatingma Jul 25, 2023
2ffb0ba
Added testing for new functions like to_networkx
heatingma Jul 25, 2023
5fd2f7b
Revised some code specification issues
heatingma Jul 25, 2023
674f871
add to_networkx and to_graphml
heatingma Jul 25, 2023
e4c7703
Moved the position of the test function to test_classic_solvers
heatingma Jul 26, 2023
8a0992b
Add test functions for graphml and networkx
heatingma Jul 26, 2023
d78fbe7
change from_numpy to to_numpy
heatingma Jul 26, 2023
4d5fb28
add networkx==2.8.8
heatingma Jul 26, 2023
c066dec
mindspore is not included in the test
heatingma Jul 26, 2023
f766626
only test pytorch
heatingma Jul 26, 2023
3bfd3ec
test_graphml and test_networkx for numpy and pytorch
heatingma Jul 26, 2023
4efffb1
update metadata of A-star
rogerwwww Jul 27, 2023
aef3599
rm typo
rogerwwww Jul 27, 2023
9010f12
add test_genn_astar
heatingma Jul 27, 2023
83efa9f
update test_astar
heatingma Jul 27, 2023
05e476f
Divide the astar into astar and genn_astar, add _load_part_model
heatingma Jul 27, 2023
ad95ff2
add blank row in the end
heatingma Jul 27, 2023
f22906f
add genn_astar
heatingma Jul 27, 2023
a50e670
add astar
heatingma Jul 27, 2023
ff01a0f
add genn_astar
heatingma Jul 27, 2023
2e24be0
try to solve the network issues during Google Drive file download
heatingma Jul 29, 2023
4f5786c
delete unused tqdm
heatingma Jul 29, 2023
15a6380
update astar_pretrain_path
heatingma Jul 29, 2023
d36e3b8
only test_genn_astar
heatingma Jul 29, 2023
37ac30c
add all tests
heatingma Jul 30, 2023
c47f6ab
change the astar_pretrain_path
heatingma Jul 30, 2023
08c86cd
add a_star.tar.gz
heatingma Jul 31, 2023
95f8eeb
change lib to astar and delete some unuseful codes
heatingma Jul 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
python -m pip install flake8 pytest-cov
if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi
if [ "${{ matrix.python-version }}" != "3.10" ]; then pip install mindspore==1.10.0; fi
- name: preparation for tests
run: |
python tests/test_a_star/prepare_for_test.py
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down Expand Up @@ -64,6 +67,9 @@ jobs:
python -m pip install --upgrade pip
python -m pip install flake8 pytest-cov
pip install -r tests/requirements_win_mac.txt
- name: preparation for tests
run: |
python tests/test_a_star/prepare_for_test.py
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -74,7 +80,6 @@ jobs:
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
Expand All @@ -94,6 +99,9 @@ jobs:
python -m pip install --upgrade pip
python -m pip install flake8 pytest-cov
python -m pip install -r tests\requirements_win_mac.txt
- name: preparation for tests
run: |
python tests/test_a_star/prepare_for_test.py
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -103,4 +111,4 @@ jobs:
- name: Test with pytest. They are divided into two runs because MindSpore will interfer 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
Binary file added docs/auto_examples/auto_examples_jupyter.zip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plz revert commits on this file.

Binary file not shown.
Binary file added docs/auto_examples/auto_examples_python.zip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plz revert commits on this file.

Binary file not shown.
46 changes: 23 additions & 23 deletions docs/auto_examples/index.rst
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plz revert commits on this file.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Jittor Backend Examples
.. only:: html

.. image:: /auto_examples/jittor/images/thumb/sphx_glr_plot_isomorphic_graphs_jittor_thumb.png
:alt: Introduction: Matching Isomorphic Graphs
:alt:

:ref:`sphx_glr_auto_examples_jittor_plot_isomorphic_graphs_jittor.py`

Expand All @@ -54,7 +54,7 @@ Jittor Backend Examples
.. only:: html

.. image:: /auto_examples/jittor/images/thumb/sphx_glr_plot_seed_graph_match_jittor_thumb.png
:alt: Seeded Graph Matching
:alt:

:ref:`sphx_glr_auto_examples_jittor_plot_seed_graph_match_jittor.py`

Expand All @@ -71,7 +71,7 @@ Jittor Backend Examples
.. only:: html

.. image:: /auto_examples/jittor/images/thumb/sphx_glr_plot_subgraphs_jittor_thumb.png
:alt: Discovering Subgraphs
:alt:

:ref:`sphx_glr_auto_examples_jittor_plot_subgraphs_jittor.py`

Expand All @@ -88,7 +88,7 @@ Jittor Backend Examples
.. only:: html

.. image:: /auto_examples/jittor/images/thumb/sphx_glr_plot_image_matching_jittor_thumb.png
:alt: Matching Image Keypoints by QAP Solvers
:alt:

:ref:`sphx_glr_auto_examples_jittor_plot_image_matching_jittor.py`

Expand All @@ -105,7 +105,7 @@ Jittor Backend Examples
.. only:: html

.. image:: /auto_examples/jittor/images/thumb/sphx_glr_plot_deep_image_matching_jittor_thumb.png
:alt: Matching Image Keypoints by Graph Matching Neural Networks
:alt:

:ref:`sphx_glr_auto_examples_jittor_plot_deep_image_matching_jittor.py`

Expand All @@ -122,7 +122,7 @@ Jittor Backend Examples
.. only:: html

.. image:: /auto_examples/jittor/images/thumb/sphx_glr_plot_model_fusion_jittor_thumb.png
:alt: Model Fusion by Graph Matching
:alt:

:ref:`sphx_glr_auto_examples_jittor_plot_model_fusion_jittor.py`

Expand Down Expand Up @@ -164,7 +164,7 @@ Numpy Backend Examples
.. only:: html

.. image:: /auto_examples/numpy/images/thumb/sphx_glr_plot_isomorphic_graphs_numpy_thumb.png
:alt: Introduction: Matching Isomorphic Graphs
:alt:

:ref:`sphx_glr_auto_examples_numpy_plot_isomorphic_graphs_numpy.py`

Expand All @@ -181,7 +181,7 @@ Numpy Backend Examples
.. only:: html

.. image:: /auto_examples/numpy/images/thumb/sphx_glr_plot_seed_graph_match_numpy_thumb.png
:alt: Seeded Graph Matching
:alt:

:ref:`sphx_glr_auto_examples_numpy_plot_seed_graph_match_numpy.py`

Expand All @@ -198,7 +198,7 @@ Numpy Backend Examples
.. only:: html

.. image:: /auto_examples/numpy/images/thumb/sphx_glr_plot_subgraphs_numpy_thumb.png
:alt: Discovering Subgraphs
:alt:

:ref:`sphx_glr_auto_examples_numpy_plot_subgraphs_numpy.py`

Expand All @@ -215,7 +215,7 @@ Numpy Backend Examples
.. only:: html

.. image:: /auto_examples/numpy/images/thumb/sphx_glr_plot_image_matching_numpy_thumb.png
:alt: Matching Image Keypoints by QAP Solvers
:alt:

:ref:`sphx_glr_auto_examples_numpy_plot_image_matching_numpy.py`

Expand All @@ -238,7 +238,7 @@ Numpy Backend Examples
/auto_examples/numpy/plot_subgraphs_numpy
/auto_examples/numpy/plot_image_matching_numpy

PaddlePaddle Backend Examples
Paddle Backend Examples
-------------------------


Expand All @@ -255,7 +255,7 @@ PaddlePaddle Backend Examples
.. only:: html

.. image:: /auto_examples/paddle/images/thumb/sphx_glr_plot_isomorphic_graphs_paddle_thumb.png
:alt: Introduction: Matching Isomorphic Graphs
:alt:

:ref:`sphx_glr_auto_examples_paddle_plot_isomorphic_graphs_paddle.py`

Expand All @@ -272,7 +272,7 @@ PaddlePaddle Backend Examples
.. only:: html

.. image:: /auto_examples/paddle/images/thumb/sphx_glr_plot_seed_graph_match_paddle_thumb.png
:alt: Seeded Graph Matching
:alt:

:ref:`sphx_glr_auto_examples_paddle_plot_seed_graph_match_paddle.py`

Expand All @@ -289,7 +289,7 @@ PaddlePaddle Backend Examples
.. only:: html

.. image:: /auto_examples/paddle/images/thumb/sphx_glr_plot_subgraphs_paddle_thumb.png
:alt: Discovering Subgraphs
:alt:

:ref:`sphx_glr_auto_examples_paddle_plot_subgraphs_paddle.py`

Expand All @@ -306,7 +306,7 @@ PaddlePaddle Backend Examples
.. only:: html

.. image:: /auto_examples/paddle/images/thumb/sphx_glr_plot_image_matching_paddle_thumb.png
:alt: Matching Image Keypoints by QAP Solvers
:alt:

:ref:`sphx_glr_auto_examples_paddle_plot_image_matching_paddle.py`

Expand All @@ -323,7 +323,7 @@ PaddlePaddle Backend Examples
.. only:: html

.. image:: /auto_examples/paddle/images/thumb/sphx_glr_plot_deep_image_matching_paddle_thumb.png
:alt: Matching Image Keypoints by Graph Matching Neural Networks
:alt:

:ref:`sphx_glr_auto_examples_paddle_plot_deep_image_matching_paddle.py`

Expand All @@ -340,7 +340,7 @@ PaddlePaddle Backend Examples
.. only:: html

.. image:: /auto_examples/paddle/images/thumb/sphx_glr_plot_model_fusion_paddle_thumb.png
:alt: Model Fusion by Graph Matching
:alt:

:ref:`sphx_glr_auto_examples_paddle_plot_model_fusion_paddle.py`

Expand Down Expand Up @@ -382,7 +382,7 @@ PyTorch Backend Examples
.. only:: html

.. image:: /auto_examples/pytorch/images/thumb/sphx_glr_plot_isomorphic_graphs_pytorch_thumb.png
:alt: Introduction: Matching Isomorphic Graphs
:alt:

:ref:`sphx_glr_auto_examples_pytorch_plot_isomorphic_graphs_pytorch.py`

Expand All @@ -399,7 +399,7 @@ PyTorch Backend Examples
.. only:: html

.. image:: /auto_examples/pytorch/images/thumb/sphx_glr_plot_seed_graph_match_pytorch_thumb.png
:alt: Seeded Graph Matching
:alt:

:ref:`sphx_glr_auto_examples_pytorch_plot_seed_graph_match_pytorch.py`

Expand All @@ -416,7 +416,7 @@ PyTorch Backend Examples
.. only:: html

.. image:: /auto_examples/pytorch/images/thumb/sphx_glr_plot_subgraphs_pytorch_thumb.png
:alt: Discovering Subgraphs
:alt:

:ref:`sphx_glr_auto_examples_pytorch_plot_subgraphs_pytorch.py`

Expand All @@ -433,7 +433,7 @@ PyTorch Backend Examples
.. only:: html

.. image:: /auto_examples/pytorch/images/thumb/sphx_glr_plot_image_matching_pytorch_thumb.png
:alt: Matching Image Keypoints by QAP Solvers
:alt:

:ref:`sphx_glr_auto_examples_pytorch_plot_image_matching_pytorch.py`

Expand All @@ -450,7 +450,7 @@ PyTorch Backend Examples
.. only:: html

.. image:: /auto_examples/pytorch/images/thumb/sphx_glr_plot_deep_image_matching_pytorch_thumb.png
:alt: Matching Image Keypoints by Graph Matching Neural Networks
:alt:

:ref:`sphx_glr_auto_examples_pytorch_plot_deep_image_matching_pytorch.py`

Expand All @@ -467,7 +467,7 @@ PyTorch Backend Examples
.. only:: html

.. image:: /auto_examples/pytorch/images/thumb/sphx_glr_plot_model_fusion_pytorch_thumb.png
:alt: Model Fusion by Graph Matching
:alt:

:ref:`sphx_glr_auto_examples_pytorch_plot_model_fusion_pytorch.py`

Expand Down
2 changes: 1 addition & 1 deletion pygmtools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from .benchmark import Benchmark
from .linear_solvers import sinkhorn, hungarian
from .classic_solvers import rrwm, sm, ipfp
from .classic_solvers import rrwm, sm, ipfp, a_star
from .multi_graph_solvers import cao, mgm_floyd, gamgm
from .neural_solvers import pca_gm, ipca_gm, cie, ngm
import pygmtools.utils as utils
Expand Down
Loading