CIDDS-001 Graph Creation
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- jupyter-notebook, numpy, python, pytorch
- Ambito
- data, machine-learning
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Jupyter Notebook
- Stelle
- 1.1k
- Fork
- 300
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#20 ·
-
HTTP Error 404: Not FoundAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#19 · 2 commenti ·
-
Book Cover image misallignedAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#18 ·
-
HAN -Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#16 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#15 ·
Tutte le issue di PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python
Issue simili
-
crate: spate-core priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue help wanted
Difficoltà 2/5 1-2 giorni Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
area: report enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ahmad-codex/shrinkvec#15 ·
-
PROV-XML reads an xsd:QName value with an undeclared prefix as a local part of the default namespaceApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
use-pipeline-processor masks corrupted X-File-Results headers by falling back to empty objectApertaarea: frontend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
snapotter-hq/SnapOtter#4045 ·
I maintainer di solito rispondono entro 1 giorno