Guidance on how to best implement labeled graphs in this library
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Empieza revisando la función loadgraphml existente y la estructura LabeledGraph propuesta. Compárala con GNNGraph de GNNGraphs.jl y con la discusión enlazada de Graphs.jl sobre los índices de aristas. El siguiente paso es resolver la API de etiquetado con los maintainers antes de preparar un pull request de un parser GXL.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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?
- Lenguaje dominante
- Julia
- Estrellas
- 62
- Forks
- 30
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de JuliaGraphs/GraphIO.jl
-
Loading weighted graphsAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
JuliaGraphs/GraphIO.jl#64 · 1 reacción ·
-
Supporting XGMMLAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
JuliaGraphs/GraphIO.jl#62 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
JuliaGraphs/GraphIO.jl#61 · 1 comentario · 5 reacciones ·
-
Support NestedGraphs.jl ?Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
JuliaGraphs/GraphIO.jl#60 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
JuliaGraphs/GraphIO.jl#57 · 1 comentario · 2 reacciones ·
Todos los issues de JuliaGraphs/GraphIO.jl
Issues similares
-
io
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
JuliaGPU/GPUArrays.jl#837 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
bmad-sim/BeamTracking.jl#382 ·
Los mantenedores suelen responder en 1 día