cugraph icon indicating copy to clipboard operation
cugraph copied to clipboard

test sphinx mapping to networkx

Open raybellwaves opened this issue 1 year ago • 5 comments

Closes https://github.com/rapidsai/cugraph/issues/4285

I'll report back if it get to render locally. Ran out of mem building the library on my ec2 machine (g5.2xlarge: 32 Gb RAM) but I did just build cudf. I'll try again soon.

~~Also brainstorming here and I probably should upstream this to the rapids CI process. Would be nice to have /ok to test docs which just builds the docs for this PR~~ created https://github.com/nv-gha-runners/nvidia-runners/issues/25

I tried building the docs locally and got

WARNING: [autosummary] failed to import cugraph.jaccard_w.
Possible hints:
* AttributeError: module 'cugraph' has no attribute 'jaccard_w'
* ImportError: 
* ModuleNotFoundError: No module named 'cugraph.jaccard_w'
WARNING: [autosummary] failed to import cugraph.overlap_w.
Possible hints:
* ModuleNotFoundError: No module named 'cugraph.overlap_w'
* ImportError: 
* AttributeError: module 'cugraph' has no attribute 'overlap_w'
WARNING: [autosummary] failed to import cugraph.sorensen_w.
Possible hints:
* ModuleNotFoundError: No module named 'cugraph.sorensen_w'
* ImportError: 
* AttributeError: module 'cugraph' has no attribute 'sorensen_w'

Think this comes from https://github.com/rapidsai/cugraph/blob/abe69c0419b67b567d3c8fce91ee1a062d53e385/docs/cugraph/source/api_docs/cugraph/link_prediction.rst#L14

but I may have messed up my build

raybellwaves avatar Apr 09 '24 04:04 raybellwaves

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

copy-pr-bot[bot] avatar Apr 09 '24 04:04 copy-pr-bot[bot]

Thanks, @raybellwaves ! The errors you saw are due to this PR, which (intentionally) removed those APIs, but I missed the .rst files. I (or @acostadon ?) will open a PR to take care of that (I created #4330).

rlratzel avatar Apr 09 '24 18:04 rlratzel

/ok to test

rlratzel avatar Apr 09 '24 18:04 rlratzel

PR #4331 fixes this. It is in review now.

acostadon avatar Apr 09 '24 20:04 acostadon

Had a couple of mins to try and build the docs again. Now getting the Traceback below.

Believe i'm missing pylibcugraphops.operators.mha_gat_n2n_bwd, pylibcugraphops.operators.mha_gat_n2n_efeat_bwd, pylibcugraphops.operators.mha_gat_n2n_efeat_fwd, pylibcugraphops.operators.mha_gat_n2n_fwd which are called in https://github.com/rapidsai/cugraph/blob/branch-24.06/docs/cugraph/source/api_docs/cugraph-ops/python/operators.rst?plain=1#L50#L53 I see those methods in pylibcugraphops 24.02 (https://colab.research.google.com/drive/1Yev1vPUbTVxXMzSrcKnraSCb5KtrFMwF?usp=sharing). But missing in 24.06.00a9. Looks like they been updated to include precision e.g. ["mha_gat_n2n_fwd_bf16_fp32", "mha_gat_n2n_fwd_fp16_fp32", "mha_gat_n2n_fwd_fp32_fp32"]

[autosummary] generating autosummary for: api_docs/cugraph-dgl/cugraph_dgl.rst, api_docs/cugraph-ops/c_cpp/index.rst, api_docs/cugraph-ops/index.rst, api_docs/cugraph-ops/python/dimenet.rst, api_docs/cugraph-ops/python/graph_types.rst, api_docs/cugraph-ops/python/index.rst, api_docs/cugraph-ops/python/operators.rst, api_docs/cugraph-ops/python/pytorch.rst, api_docs/cugraph-pyg/cugraph_pyg.rst, api_docs/cugraph/centrality.rst, ..., tutorials/index.rst, wholegraph/basics/index.rst, wholegraph/basics/wholegraph_intro.md, wholegraph/basics/wholememory_implementation_details.md, wholegraph/basics/wholememory_intro.md, wholegraph/index.rst, wholegraph/installation/container.md, wholegraph/installation/getting_wholegraph.md, wholegraph/installation/index.rst, wholegraph/installation/source_build.md
WARNING: [autosummary] failed to import pylibcugraphops.operators.mha_gat_n2n_bwd.
Possible hints:
* AttributeError: module 'pylibcugraphops.operators' has no attribute 'mha_gat_n2n_bwd'
* ImportError:
* ModuleNotFoundError: No module named 'pylibcugraphops.operators.mha_gat_n2n_bwd'
WARNING: [autosummary] failed to import pylibcugraphops.operators.mha_gat_n2n_efeat_bwd.
Possible hints:
* ImportError:
* ModuleNotFoundError: No module named 'pylibcugraphops.operators.mha_gat_n2n_efeat_bwd'
* AttributeError: module 'pylibcugraphops.operators' has no attribute 'mha_gat_n2n_efeat_bwd'
WARNING: [autosummary] failed to import pylibcugraphops.operators.mha_gat_n2n_efeat_fwd.
Possible hints:
* ImportError:
* ModuleNotFoundError: No module named 'pylibcugraphops.operators.mha_gat_n2n_efeat_fwd'
* AttributeError: module 'pylibcugraphops.operators' has no attribute 'mha_gat_n2n_efeat_fwd'
WARNING: [autosummary] failed to import pylibcugraphops.operators.mha_gat_n2n_fwd.
Possible hints:
* ImportError:
* ModuleNotFoundError: No module named 'pylibcugraphops.operators.mha_gat_n2n_fwd'
* AttributeError: module 'pylibcugraphops.operators' has no attribute 'mha_gat_n2n_fwd'

Traceback (most recent call last):
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/ext/autosummary/generate.py", line 395, in generate_autosummary_docs
    name, obj, parent, modname = import_by_name(entry.name)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/ext/autosummary/__init__.py", line 661, in import_by_name
    raise ImportExceptionGroup('no module named %s' % ' or '.join(tried), exceptions)
sphinx.ext.autosummary.ImportExceptionGroup: no module named pylibcugraphops.pytorch.operators.agg_concat_n2n

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/events.py", line 94, in emit
    results.append(listener.handler(self.app, *args))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/ext/autosummary/__init__.py", line 811, in process_generate_options
    generate_autosummary_docs(genfiles, suffix=suffix, base_path=app.srcdir,
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/ext/autosummary/generate.py", line 400, in generate_autosummary_docs
    name, obj, parent, modname = import_ivar_by_name(entry.name)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/ext/autosummary/__init__.py", line 720, in import_ivar_by_name
    real_name, obj, parent, modname = import_by_name(name, prefixes, grouped_exception)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/ext/autosummary/__init__.py", line 661, in import_by_name
    raise ImportExceptionGroup('no module named %s' % ' or '.join(tried), exceptions)
sphinx.ext.autosummary.ImportExceptionGroup: no module named pylibcugraphops.pytorch.operators

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/application.py", line 262, in __init__
    self._init_builder()
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/application.py", line 335, in _init_builder
    self.events.emit('builder-inited')
  File "/home/ubuntu/.conda/envs/all_cuda-122_arch-x86_64/lib/python3.11/site-packages/sphinx/events.py", line 105, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function process_generate_options at 0x762210477ce0> for event 'builder-inited' threw an exception (exception: no module named pylibcugraphops.pytorch.operators)

Extension error (sphinx.ext.autosummary):
Handler <function process_generate_options at 0x762210477ce0> for event 'builder-inited' threw an exception (exception: no module named pylibcugraphops.pytorch.operators)

Steps taken:

git clone https://github.com/raybellwaves/cugraph.git
cd cugraph
git checkout intersphinx-mapping-test
# Apply https://github.com/rapidsai/cugraph/pull/4331
conda env create -f conda/environments/all_cuda-122_arch-x86_64.yaml
conda activate all_cuda-122_arch-x86_64
./build.sh
./build.sh cugraph-service
./build.sh cugraph-pyg
./build.sh cugraph-dgl
./build.sh cugraph-equivariant
./build.sh nx-cugraph
./build.sh docs

raybellwaves avatar Apr 11 '24 21:04 raybellwaves

/ok to test

rlratzel avatar May 20 '24 21:05 rlratzel

/ok to test

rlratzel avatar May 20 '24 21:05 rlratzel

/merge

rlratzel avatar May 20 '24 21:05 rlratzel