Guidance on how to best implement labeled graphs in this library
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia esaminando la funzione loadgraphml esistente e la struttura LabeledGraph proposta. Confrontala con GNNGraph di GNNGraphs.jl e con la discussione collegata di Graphs.jl sugli indici degli archi. Il passaggio successivo consiste nel definire l'API di etichettatura con i maintainer prima di preparare una pull request per un parser GXL.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
As part of a project I am working, I needed to read in graph files in the GXL graph format, including their label data.
As this format is not yet supported in this library, I would like to contribute my parser (which I wrote by modifying the existing loadgraphml function). The issue is that, as far as I can tell, there is no existing concept on how to implement graph labels in this library, or even in Graphs.jl.
There is an implementation of a labeled graph in GNNGraphs.jl (the GNNGraph), but I don't think this is the correct implementation to use in this library for two reasons:
- As I understand the code they rely on edge indices for the edge labels, which I believe is not officially supported by Graphs.jl (see this issue)
- It introduces an external dependency that is not really connected to this project
Instead, I have used the following struct to implement labeled graphs, the usage of Dicts inspired by the DataStore in GNNGraphs.jl:
GraphLabels = Dict{String, Any}
struct LabeledGraph
g::AbstractGraph
nlabels::Vector{GraphLabels}
elabels::Matrix{Union{GraphLabels, Missing}}
end
I have used a matrix for the edgelabels to avoid having to index the edges. While it would clearly be more storage efficient to use a vector, I believe having to maintain an edge index list would be even more resource intensive than simply using a matrix. Additionally, one can easily extend this to use sparse matrices instead if the graph in question is sparse and large, and it neatly supports both directed and undirected graphs.
Since there is no precedent for this kind of structure, I propose that my parser for this library be split into two versions. One, which simply returns the underlying graph object, and thus conforms to the existing return structure. The other returns a LabeledGraph object as described above. In my opinion this is the best compromise between not parsing the extra label data at all and introducing a new graph object for everyone immediately.
The purpose of this issue is then to ask for opinions on this proposed implementation before I clean up my code for a pull request. Is this acceptable, or are there things I should do differently?
- Lingua principale
- Julia
- Stelle
- 62
- Fork
- 30
- 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 JuliaGraphs/GraphIO.jl
-
Loading weighted graphsAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
JuliaGraphs/GraphIO.jl#64 · 1 reazione ·
-
Supporting XGMMLAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
JuliaGraphs/GraphIO.jl#62 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
JuliaGraphs/GraphIO.jl#61 · 1 commento · 5 reazioni ·
-
Support NestedGraphs.jl ?Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
JuliaGraphs/GraphIO.jl#60 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
JuliaGraphs/GraphIO.jl#57 · 1 commento · 2 reazioni ·
Tutte le issue di JuliaGraphs/GraphIO.jl
Issue simili
-
Broken links in the docsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
oxfordcontrol/COSMO.jl#211 ·
-
documentation
Difficoltà 2/5 Mezza giornata Idoneità per principianti 65/100
I maintainer di solito rispondono entro 6 giorni
-
Out-of-place JLArray/GPU problem with VectorContinuousCallback scalar-indexes (callback cache built with CPU zeros)Forse già presa @ChrisRackauckas-Claude l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
SciML/OrdinaryDiffEq.jl#4813 ·
I maintainer di solito rispondono entro 1 giorno
-
ARKODE: callbacks that modify `u` throw MethodError on reinitForse già presa @devmotion l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
SciML/Sundials.jl#575 ·