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

Parametrise GAT interpretability demo to run faster on CI #881

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

huonw
Copy link
Member

@huonw huonw commented Feb 17, 2020

In #1744, we enabled the basic interpretability notebooks on CI, but it takes 12 minutes to run (15 minutes total): https://github.com/stellargraph/stellargraph/runs/820744662

This PR parameterises the demo to run faster and use less CI time.

See: #819

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB.

huonw added a commit that referenced this pull request Feb 18, 2020
This does a small change to `node-link-importance-demo-gat.ipynb` to get it
working again after the switch to the new `StellarGraph` class. In particular,
the change to the new StellarGraph changed the order in which nodes appear. so:

1. the code that was (effectively) `G.nodes()[7]` was no longer selecting the
   node with ID `1109199`
2. the code that was translating between IDs and indices was sometimes doing it
   via the `Gnx` (the NetworkX graph) and sometimes via `G`/`graph_nodes` (the
   `StellarGraph`) which gave different results.

This switches 1 to starting with the actual node ID of interest, and 2 to always
using a single list (`graph_nodes` or `nodes` as appropriate).

The code is quite poor in many ways here (all of the `.index` calls are O(n)),
but in the interests of getting this fixed as soon as possible, this tries to
keep the changes here minimal and not make any improvements. The work to get
this notebook running on CI is a little intricate/fiddly (#881).

See: #868
@huonw huonw force-pushed the bugfix/819-interpretability-gat-ci branch from 5b468ae to e11a810 Compare February 18, 2020 04:45
@codecov-io
Copy link

codecov-io commented Feb 18, 2020

Codecov Report

Merging #881 into bugfix/868-node-importance-gat will decrease coverage by 4.9%.
The diff coverage is n/a.

Impacted file tree graph

@@                       Coverage Diff                        @@
##           bugfix/868-node-importance-gat    #881     +/-   ##
================================================================
- Coverage                            87.2%   82.3%   -4.9%     
================================================================
  Files                                  47      45      -2     
  Lines                                5697    4901    -796     
================================================================
- Hits                                 4967    4032    -935     
- Misses                                730     869    +139
Impacted Files Coverage Δ
stellargraph/layer/preprocessing_layer.py 50% <0%> (-17.6%) ⬇️
stellargraph/layer/link_inference.py 70.9% <0%> (-16.5%) ⬇️
stellargraph/layer/graph_attention.py 74.8% <0%> (-15%) ⬇️
stellargraph/layer/cluster_gcn.py 77.6% <0%> (-13.3%) ⬇️
stellargraph/layer/rgcn.py 77.1% <0%> (-12.7%) ⬇️
stellargraph/layer/ppnp.py 66.1% <0%> (-10.7%) ⬇️
stellargraph/layer/graphsage.py 68.9% <0%> (-10.5%) ⬇️
stellargraph/layer/appnp.py 76.8% <0%> (-8.6%) ⬇️
stellargraph/layer/hinsage.py 85.4% <0%> (-8.3%) ⬇️
stellargraph/layer/misc.py 85.7% <0%> (-7.1%) ⬇️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 50bb3e2...e11a810. Read the comment docs.

@huonw huonw changed the base branch from bugfix/868-node-importance-gat to develop February 18, 2020 04:59
@huonw huonw force-pushed the bugfix/819-interpretability-gat-ci branch from e11a810 to 002a82a Compare February 24, 2020 00:30
@codeclimate
Copy link

codeclimate bot commented Feb 24, 2020

Code Climate has analyzed commit b045b76 and detected 0 issues on this pull request.

View more on Code Climate.

@huonw huonw force-pushed the bugfix/819-interpretability-gat-ci branch from 002a82a to 2ca2865 Compare February 24, 2020 06:19
@huonw huonw force-pushed the bugfix/819-interpretability-gat-ci branch from 2ca2865 to 00be110 Compare May 18, 2020 03:22
@huonw huonw force-pushed the bugfix/819-interpretability-gat-ci branch from 5c73e4c to e49c54a Compare June 30, 2020 01:14
@huonw huonw changed the title Parametrise GAT interpretability demo to run on CI Parametrise GAT interpretability demo to run faster on CI Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants