CIDDS-001 Graph Creation
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- jupyter-notebook, numpy, python, pytorch
- 領域
- data, machine-learning
調査の方向性
Open the Chapter 16 notebook and trace get_connections, ip_map construction, and the assignment to batch['host'].x. Compare host node IDs with the feature-row source and destination IPs; done means the host features and edge indices refer to the same unique hosts, with the notebook still running consistently.
索引モデルが issue の本文から書いたものです。
説明
I noticed a possible issue in Chapter 16’s host–flow bipartite graph construction.
The code creates host node indices from unique source and destination IPs:
ip_map = {ip: index for index, ip in enumerate(np.unique(np.append(src_ip, dst_ip)))}
host_to_flow, flow_to_host = get_connections(ip_map, src_ip, dst_ip)
So the host node IDs in edge_index correspond to unique IP addresses.
However, the host feature matrix is assigned directly from the subgraph dataframe rows:
batch['host'].x = torch.Tensor(subgraph[features_host].to_numpy()).float()
where:
features_host = [f'ipsrc_{i}' for i in range(1, 17)] + [f'ipdst_{i}' for i in range(1, 17)]
This means batch['host'].x has one row per flow record, and each row contains:
source_ip_features || destination_ip_features
But the edge indices treat host rows as unique-IP nodes.
As a result, the graph can be valid tensor-wise, because the number of unique IPs is usually less than or equal to the number of flow rows, but the feature semantics may be misaligned:
edge_index host IDs: unique IP indices
batch['host'].x rows: flow-row endpoint-pair features
For example, host.x[3] may not actually contain the features for the unique IP mapped to host node 3; it may instead contain the source/destination IP features from dataframe row 3.
Would it be more consistent to build batch['host'].x with one row per unique IP in ip_map, e.g., by extracting features for each unique host individually, rather than assigning subgraph[features_host] directly?
Thanks again for the helpful notebook.
- 主要言語
- Jupyter Notebook
- スター
- 1.1k
- フォーク
- 300
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#20 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#19 · コメント 2 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#18 ·
-
HAN -オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#16 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#15 ·
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python の issue をすべて見る
似ている issue
-
approved correction metadata
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
acl-org/acl-anthology#10663 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
freelawproject/juriscraper#2367 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
community-request
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NVIDIA-NeMo/Curator#2540 ·
メンテナーはふだん 4 日以内に返信
-
Type: ☹︎ Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
posit-dev/great-tables#1047 ·
メンテナーはふだん 1 日以内に返信