bitflicker64 opened a new pull request, #482:
URL: https://github.com/apache/hugegraph-doc/pull/482

   Syncs the HugeGraph-ML quick start (en and cn) with 
`apache/hugegraph-ai@main` at version 1.7.0. Every change below traces to a 
file on `main`.
   
   | Page | Wrong | Changed to | Source |
   |---|---|---|---|
   | en + cn | Intro listed only node embedding, node classification, graph 
classification | Added link prediction and fraud detection | 
`hugegraph-ml/src/hugegraph_ml/tasks/link_prediction_seal.py:32`, 
`.../fraud_detector_caregnn.py:27` |
   | en + cn | No statement of how the module reaches the server | Reads use 
the Gremlin endpoint via `pyhugegraph`; importers use schema and batch APIs in 
batches of 500 | `hugegraph-ml/src/hugegraph_ml/data/hugegraph2dgl.py:41,54`, 
`.../utils/dgl2hugegraph_utils.py:45` |
   | en + cn | No torch / dgl / ogb versions anywhere on the page | Added pin 
table: `torch==2.2.0`, `dgl~=2.1.0`, `ogb~=1.3.6`, `torchdata~=0.7.0`, 
`catboost~=1.2.3`, `category-encoders~=2.6.3`, `numpy~=1.24.4`, `pandas~=2.2.3` 
| `pyproject.toml:109,110,136-140,143` |
   | en + cn | No mention of CPU vs GPU | Pins install CPU builds; every task 
takes `gpu` defaulting to `-1` | 
`hugegraph-ml/src/hugegraph_ml/tasks/node_embed.py:49`, 
`.../node_classify.py:61` |
   | en + cn | Models table grouped names by purpose, framed as "the current 
README lists these models" | Per-module table of model, module file, entry 
class, purpose and paper link, derived from the source tree | 
`hugegraph-ml/src/hugegraph_ml/models/agnn.py:33`, `appnp.py:32`, 
`arma.py:122`, `bgnn.py:60`, `bgrl.py:93`, `care_gnn.py:127`, 
`cluster_gcn.py:34`, `correct_and_smooth.py:160`, `dagnn.py:100`, 
`deepergcn.py:38`, `dgi.py:35`, `diffpool.py:36`, `gatne.py:66`, `grace.py:36`, 
`grand.py:35`, `jknet.py:33`, `pgnn.py:79`, `seal.py:175` |
   | en + cn | BGNN listed under "Fraud detection" | BGNN is gradient boosting 
combined with a GNN over node features; the bundled example runs 
`task="regression"` | 
`hugegraph-ml/src/hugegraph_ml/examples/bgnn_example.py:40` |
   | en + cn | GIN and MLPClassifier only mentioned in a trailing prose note | 
Promoted to first-class rows in the models table | 
`hugegraph-ml/src/hugegraph_ml/models/gin_global_pool.py:26`, `.../mlp.py:22` |
   | en + cn | Nothing said about how to import models | `models/__init__.py` 
re-exports nothing; import from the module file | 
`hugegraph-ml/src/hugegraph_ml/models/__init__.py:1` |
   | en + cn | Missing: GIN pooling options | `sum` (default), `mean`, `max`, 
`global_attention`, `set2set` | 
`hugegraph-ml/src/hugegraph_ml/models/gin_global_pool.py:41` |
   | en + cn | Missing section: the conversion API. Only `convert_graph` 
appeared, inside an example | New "Reading Graph Data" section with the 
constructor and all seven public methods with their defaults | 
`hugegraph-ml/src/hugegraph_ml/data/hugegraph2dgl.py:33,44,60,114,148,158,177,185`
 |
   | en + cn | Missing: which `ndata` keys each task requires | `NodeEmbed` 
needs `feat`; the three node classification tasks need `feat`, `label`, 
`train_mask`, `val_mask`, `test_mask` | 
`hugegraph-ml/src/hugegraph_ml/tasks/node_embed.py:36`, 
`.../node_classify.py:38` |
   | en + cn | Missing section: dataset importers. Only 
`import_graph_from_dgl("cora")` appeared | New "Importing Sample Datasets" 
section: nine importers, the dataset names each accepts, and the labels each 
creates | 
`hugegraph-ml/src/hugegraph_ml/utils/dgl2hugegraph_utils.py:59,130,211,295,366,424,513,613,749`
 |
   | en + cn | Missing: `clear_all_data` and the test fixture flow | Drops all 
vertices and edges; the fixture calls it, loads `CORA`, `MUTAG`, `ACM`, then 
calls it again | 
`hugegraph-ml/src/hugegraph_ml/utils/dgl2hugegraph_utils.py:48`, 
`hugegraph-ml/src/tests/conftest.py:29` |
   | en + cn | Missing: `AMAZONGATNE` and `AVAZU` are not auto-downloaded | 
Added a note pointing at the archive URLs in the source comments | 
`hugegraph-ml/src/hugegraph_ml/utils/dgl2hugegraph_utils.py:303,757` |
   | en + cn | Missing section: task classes. Only `NodeEmbed` and 
`NodeClassify` appeared in examples | New "Tasks" section covering all nine 
task classes with entry points and defaults, including the `GraphClassify` 
70/20/10 split, `NodeClassifyWithSample` being CPU only, `LinkPredictionSeal` 
calling `data_prepare()` in its constructor, and `DetectorCaregnn` reading 
`ndata["feature"]` | `hugegraph-ml/src/hugegraph_ml/tasks/node_embed.py:42`, 
`node_classify.py:54`, `node_classify_with_edge.py:58`, 
`node_classify_with_sample.py:65`, `graph_classify.py:59,73`, 
`fraud_detector_caregnn.py:81`, `hetero_sample_embed_gatne.py:40`, 
`link_prediction_pgnn.py:36`, `link_prediction_seal.py:43` |
   | en + cn | Missing: `EarlyStopping` behaviour | `patience` defaults to 
`float("inf")`, monitors `loss` or `accuracy`, restores best weights | 
`hugegraph-ml/src/hugegraph_ml/utils/early_stopping.py:42` |
   | en + cn | Missing section: the example scripts. Only two were named, in 
prose | New "Runnable Examples" section with the run command from 
`hugegraph-ml/src` and a 19-row table of script, model, task and graph labels 
read | `hugegraph-ml/src/hugegraph_ml/examples/agnn_example.py:23`, 
`bgnn_example.py:32`, `care_gnn_example.py:27`, `cluster_gcn_example.py:25`, 
`deepergcn_example.py:25`, `diffpool_example.py:25`, `gatne_example.py:26`, 
`gin_example.py:25`, `pgnn_example.py:26`, `seal_example.py:28` |
   | en + cn | DGI example did not show what `evaluate()` returns | Added the 
metrics dict and a sample value | 
`hugegraph-ml/src/hugegraph_ml/tasks/node_classify.py:44`, 
`hugegraph-ml/README.md:137` |
   | en + cn | `import_graph_from_dgl("cora")` gave no hint why the labels are 
`CORA_*` | The name is upper-cased before use | 
`hugegraph-ml/src/hugegraph_ml/utils/dgl2hugegraph_utils.py:67` |
   | en + cn | GRAND example did not explain its non-standard output | GRAND 
returns a list of logits per augmentation and `NodeClassify` masks each element 
| `hugegraph-ml/src/hugegraph_ml/tasks/node_classify.py:87` |
   | en + cn | Troubleshooting had no entry for the missing-attribute failure | 
Added `ValueError: Graph is missing required node attribute ...` with the fix | 
`hugegraph-ml/src/hugegraph_ml/tasks/node_classify.py:41` |
   | en + cn | Troubleshooting had no entry for unsupported dataset names | 
Added `ValueError: dataset not supported`, and that `import_graph_from_ogb` 
matches `ogbl-collab` without upper-casing | 
`hugegraph-ml/src/hugegraph_ml/utils/dgl2hugegraph_utils.py:75,521` |
   | en + cn | No warning that `bgrl_example.py` fails on import | It imports 
`MLP_Predictor`, but the class is `MLPPredictor` | 
`hugegraph-ml/src/hugegraph_ml/examples/bgrl_example.py:19`, 
`.../models/bgrl.py:43` |
   | en + cn | No warning that `care_gnn_example.py` has no matching importer | 
It reads `AMAZON_user_v` and three `AMAZON_net_*_e` labels that no bundled 
importer creates | 
`hugegraph-ml/src/hugegraph_ml/examples/care_gnn_example.py:28`, 
`.../utils/dgl2hugegraph_utils.py:306` |
   
   ## Upstream defects found while reading the code
   
   Not fixed here, they belong in `apache/hugegraph-ai`:
   
   - `hugegraph-ml/README.md:35` says "python 3.9+", but 
`hugegraph-ml/pyproject.toml:32` sets `requires-python = ">=3.10"`.
   - Root `README.md:105,107` advertises DeepWalk, Node2Vec, GAT, GCN and 
GraphSAGE. `models/` contains no DeepWalk, Node2Vec or GAT; GraphSAGE exists 
only as `SAGE` inside `cluster_gcn.py:34`, and GCN only as encoder classes 
inside `bgrl.py:71`, `grace.py:196` and `seal.py:51`.
   - `hugegraph-ml/src/hugegraph_ml/examples/bgrl_example.py:19` imports 
`MLP_Predictor`, which does not exist; `models/bgrl.py:43` defines 
`MLPPredictor`. `src/tests/test_examples/test_examples.py:24` imports this 
example, so the whole example test module fails to collect.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to