glam4cm 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. glam4cm-0.1.0/LICENSE +21 -0
  2. glam4cm-0.1.0/PKG-INFO +86 -0
  3. glam4cm-0.1.0/README.md +36 -0
  4. glam4cm-0.1.0/pyproject.toml +47 -0
  5. glam4cm-0.1.0/setup.cfg +4 -0
  6. glam4cm-0.1.0/src/glam4cm/__init__.py +9 -0
  7. glam4cm-0.1.0/src/glam4cm/data_loading/__init__.py +0 -0
  8. glam4cm-0.1.0/src/glam4cm/data_loading/data.py +631 -0
  9. glam4cm-0.1.0/src/glam4cm/data_loading/encoding.py +76 -0
  10. glam4cm-0.1.0/src/glam4cm/data_loading/graph_dataset.py +940 -0
  11. glam4cm-0.1.0/src/glam4cm/data_loading/metadata.py +84 -0
  12. glam4cm-0.1.0/src/glam4cm/data_loading/models_dataset.py +361 -0
  13. glam4cm-0.1.0/src/glam4cm/data_loading/utils.py +20 -0
  14. glam4cm-0.1.0/src/glam4cm/downstream_tasks/__init__.py +0 -0
  15. glam4cm-0.1.0/src/glam4cm/downstream_tasks/bert_edge_classification.py +144 -0
  16. glam4cm-0.1.0/src/glam4cm/downstream_tasks/bert_graph_classification.py +137 -0
  17. glam4cm-0.1.0/src/glam4cm/downstream_tasks/bert_graph_classification_comp.py +156 -0
  18. glam4cm-0.1.0/src/glam4cm/downstream_tasks/bert_link_prediction.py +145 -0
  19. glam4cm-0.1.0/src/glam4cm/downstream_tasks/bert_node_classification.py +164 -0
  20. glam4cm-0.1.0/src/glam4cm/downstream_tasks/cm_gpt_edge_classification.py +73 -0
  21. glam4cm-0.1.0/src/glam4cm/downstream_tasks/cm_gpt_node_classification.py +76 -0
  22. glam4cm-0.1.0/src/glam4cm/downstream_tasks/cm_gpt_pretraining.py +64 -0
  23. glam4cm-0.1.0/src/glam4cm/downstream_tasks/common_args.py +160 -0
  24. glam4cm-0.1.0/src/glam4cm/downstream_tasks/create_dataset.py +51 -0
  25. glam4cm-0.1.0/src/glam4cm/downstream_tasks/gnn_edge_classification.py +106 -0
  26. glam4cm-0.1.0/src/glam4cm/downstream_tasks/gnn_graph_cls.py +101 -0
  27. glam4cm-0.1.0/src/glam4cm/downstream_tasks/gnn_link_prediction.py +109 -0
  28. glam4cm-0.1.0/src/glam4cm/downstream_tasks/gnn_node_classification.py +103 -0
  29. glam4cm-0.1.0/src/glam4cm/downstream_tasks/tf_idf_text_classification.py +22 -0
  30. glam4cm-0.1.0/src/glam4cm/downstream_tasks/utils.py +35 -0
  31. glam4cm-0.1.0/src/glam4cm/downstream_tasks/word2vec_text_classification.py +108 -0
  32. glam4cm-0.1.0/src/glam4cm/embeddings/__init__.py +0 -0
  33. glam4cm-0.1.0/src/glam4cm/embeddings/bert.py +72 -0
  34. glam4cm-0.1.0/src/glam4cm/embeddings/common.py +43 -0
  35. glam4cm-0.1.0/src/glam4cm/embeddings/fasttext.py +0 -0
  36. glam4cm-0.1.0/src/glam4cm/embeddings/tfidf.py +25 -0
  37. glam4cm-0.1.0/src/glam4cm/embeddings/w2v.py +41 -0
  38. glam4cm-0.1.0/src/glam4cm/encoding/__init__.py +0 -0
  39. glam4cm-0.1.0/src/glam4cm/encoding/common.py +0 -0
  40. glam4cm-0.1.0/src/glam4cm/encoding/encoders.py +100 -0
  41. glam4cm-0.1.0/src/glam4cm/graph2str/__init__.py +0 -0
  42. glam4cm-0.1.0/src/glam4cm/graph2str/common.py +34 -0
  43. glam4cm-0.1.0/src/glam4cm/graph2str/constants.py +15 -0
  44. glam4cm-0.1.0/src/glam4cm/graph2str/ontouml.py +141 -0
  45. glam4cm-0.1.0/src/glam4cm/graph2str/uml.py +0 -0
  46. glam4cm-0.1.0/src/glam4cm/lang2graph/__init__.py +0 -0
  47. glam4cm-0.1.0/src/glam4cm/lang2graph/archimate.py +31 -0
  48. glam4cm-0.1.0/src/glam4cm/lang2graph/bpmn.py +0 -0
  49. glam4cm-0.1.0/src/glam4cm/lang2graph/common.py +416 -0
  50. glam4cm-0.1.0/src/glam4cm/lang2graph/ecore.py +221 -0
  51. glam4cm-0.1.0/src/glam4cm/lang2graph/ontouml.py +169 -0
  52. glam4cm-0.1.0/src/glam4cm/lang2graph/utils.py +80 -0
  53. glam4cm-0.1.0/src/glam4cm/models/cmgpt.py +352 -0
  54. glam4cm-0.1.0/src/glam4cm/models/gnn_layers.py +273 -0
  55. glam4cm-0.1.0/src/glam4cm/models/hf.py +10 -0
  56. glam4cm-0.1.0/src/glam4cm/run.py +99 -0
  57. glam4cm-0.1.0/src/glam4cm/run_configs.py +126 -0
  58. glam4cm-0.1.0/src/glam4cm/settings.py +54 -0
  59. glam4cm-0.1.0/src/glam4cm/tokenization/__init__.py +0 -0
  60. glam4cm-0.1.0/src/glam4cm/tokenization/special_tokens.py +4 -0
  61. glam4cm-0.1.0/src/glam4cm/tokenization/utils.py +37 -0
  62. glam4cm-0.1.0/src/glam4cm/trainers/__init__.py +0 -0
  63. glam4cm-0.1.0/src/glam4cm/trainers/bert_classifier.py +105 -0
  64. glam4cm-0.1.0/src/glam4cm/trainers/cm_gpt_trainer.py +153 -0
  65. glam4cm-0.1.0/src/glam4cm/trainers/gnn_edge_classifier.py +126 -0
  66. glam4cm-0.1.0/src/glam4cm/trainers/gnn_graph_classifier.py +123 -0
  67. glam4cm-0.1.0/src/glam4cm/trainers/gnn_link_predictor.py +144 -0
  68. glam4cm-0.1.0/src/glam4cm/trainers/gnn_node_classifier.py +135 -0
  69. glam4cm-0.1.0/src/glam4cm/trainers/gnn_trainer.py +129 -0
  70. glam4cm-0.1.0/src/glam4cm/trainers/metrics.py +55 -0
  71. glam4cm-0.1.0/src/glam4cm/utils.py +194 -0
  72. glam4cm-0.1.0/src/glam4cm.egg-info/PKG-INFO +86 -0
  73. glam4cm-0.1.0/src/glam4cm.egg-info/SOURCES.txt +75 -0
  74. glam4cm-0.1.0/src/glam4cm.egg-info/dependency_links.txt +1 -0
  75. glam4cm-0.1.0/src/glam4cm.egg-info/entry_points.txt +2 -0
  76. glam4cm-0.1.0/src/glam4cm.egg-info/requires.txt +18 -0
  77. glam4cm-0.1.0/src/glam4cm.egg-info/top_level.txt +1 -0
glam4cm-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Syed Juned Ali
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
glam4cm-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,86 @@
1
+ Metadata-Version: 2.2
2
+ Name: glam4cm
3
+ Version: 0.1.0
4
+ Summary: Graph Neural Networks and Language Models Trainer (Separate or combined) for conceptual models
5
+ Author-email: Syed Juned Ali <syed.juned.ali@tuwien.ac.at>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Syed Juned Ali
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/junaidiiith/glam4cm
29
+ Project-URL: Issues, https://github.com/junaidiiith/glam4cm/issues
30
+ Requires-Python: >=3.8
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE
33
+ Requires-Dist: langchain-text-splitters
34
+ Requires-Dist: scikit-learn
35
+ Requires-Dist: scipy
36
+ Requires-Dist: torch
37
+ Requires-Dist: numpy
38
+ Requires-Dist: transformers
39
+ Requires-Dist: sentence-transformers
40
+ Requires-Dist: tqdm
41
+ Requires-Dist: networkx
42
+ Requires-Dist: torch_geometric
43
+ Requires-Dist: pandas
44
+ Requires-Dist: tensorboardX
45
+ Requires-Dist: xmltodict
46
+ Requires-Dist: fasttext
47
+ Provides-Extra: dev
48
+ Requires-Dist: pytest; extra == "dev"
49
+ Requires-Dist: black; extra == "dev"
50
+
51
+ # glam4cm
52
+
53
+ The data in this archive is derived from the user-contributed content on the
54
+ Cooking Stack Exchange website (https://cooking.stackexchange.com/), used under
55
+ CC-BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/).
56
+
57
+ The original data dump can be downloaded from:
58
+ https://archive.org/download/stackexchange/cooking.stackexchange.com.7z
59
+ and details about the dump obtained from:
60
+ https://archive.org/details/stackexchange
61
+
62
+ We distribute two files, under CC-BY-SA 3.0:
63
+
64
+ - cooking.stackexchange.txt, which contains all question titles and
65
+ their associated tags (one question per line, tags are prefixed by
66
+ the string "__label__") ;
67
+
68
+ - cooking.stackexchange.id, which contains the corresponding row IDs,
69
+ from the original data dump.
70
+
71
+
72
+ Node classification
73
+ Language Model
74
+ Freezing parameters
75
+ Effect of attributes
76
+ Effect of edge information
77
+ Edge of partial node type information
78
+
79
+ GNN
80
+ GCNConv, SAGEConv, GATConv
81
+ Random Node Embeddings
82
+ Bert Node Embeddings
83
+ Finetuned Node Embeddings
84
+ Random Edge Embeddings
85
+ Bert Edge Embeddings
86
+ Finetuned Edge Embeddings
@@ -0,0 +1,36 @@
1
+ # glam4cm
2
+
3
+ The data in this archive is derived from the user-contributed content on the
4
+ Cooking Stack Exchange website (https://cooking.stackexchange.com/), used under
5
+ CC-BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/).
6
+
7
+ The original data dump can be downloaded from:
8
+ https://archive.org/download/stackexchange/cooking.stackexchange.com.7z
9
+ and details about the dump obtained from:
10
+ https://archive.org/details/stackexchange
11
+
12
+ We distribute two files, under CC-BY-SA 3.0:
13
+
14
+ - cooking.stackexchange.txt, which contains all question titles and
15
+ their associated tags (one question per line, tags are prefixed by
16
+ the string "__label__") ;
17
+
18
+ - cooking.stackexchange.id, which contains the corresponding row IDs,
19
+ from the original data dump.
20
+
21
+
22
+ Node classification
23
+ Language Model
24
+ Freezing parameters
25
+ Effect of attributes
26
+ Effect of edge information
27
+ Edge of partial node type information
28
+
29
+ GNN
30
+ GCNConv, SAGEConv, GATConv
31
+ Random Node Embeddings
32
+ Bert Node Embeddings
33
+ Finetuned Node Embeddings
34
+ Random Edge Embeddings
35
+ Bert Edge Embeddings
36
+ Finetuned Edge Embeddings
@@ -0,0 +1,47 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "glam4cm"
7
+ version = "0.1.0"
8
+ description = "Graph Neural Networks and Language Models Trainer (Separate or combined) for conceptual models"
9
+ authors = [
10
+ {name = "Syed Juned Ali", email = "syed.juned.ali@tuwien.ac.at"}
11
+ ]
12
+ dependencies = [
13
+ "langchain-text-splitters",
14
+ "scikit-learn",
15
+ "scipy",
16
+ "torch",
17
+ "numpy",
18
+ "transformers",
19
+ "sentence-transformers",
20
+ "tqdm",
21
+ "networkx",
22
+ "torch_geometric",
23
+ "pandas",
24
+ "tensorboardX",
25
+ "xmltodict",
26
+ "fasttext"
27
+ ]
28
+
29
+ dynamic = ["readme"]
30
+ license = {file = "LICENSE"}
31
+ requires-python = ">=3.8"
32
+
33
+ [project.optional-dependencies]
34
+ dev = ["pytest", "black"]
35
+
36
+ [project.scripts]
37
+ glam4cm = "glam4cm.run:main"
38
+
39
+ [tool.setuptools.dynamic]
40
+ readme = {file = "README.md", content-type = "text/markdown"}
41
+
42
+ [tool.setuptools]
43
+ license-files = ["LICENSE"]
44
+
45
+ [project.urls]
46
+ Homepage = "https://github.com/junaidiiith/glam4cm"
47
+ Issues = "https://github.com/junaidiiith/glam4cm/issues"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,9 @@
1
+ import warnings
2
+
3
+ warnings.filterwarnings(
4
+ "ignore",
5
+ message="Pydantic serializer warnings:",
6
+ category=UserWarning,
7
+ module="pydantic.main",
8
+ )
9
+ __version__ = "0.1.0"
File without changes