tgraphx 0.3.0__tar.gz → 0.3.1__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 (168) hide show
  1. {tgraphx-0.3.0 → tgraphx-0.3.1}/PKG-INFO +2 -3
  2. {tgraphx-0.3.0 → tgraphx-0.3.1}/pyproject.toml +2 -3
  3. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_imports.py +1 -0
  4. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_synthetic_datasets.py +1 -1
  5. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_tiny_overfit_v030.py +3 -3
  6. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/__init__.py +3 -1
  7. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/folder.py +4 -3
  8. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/PKG-INFO +2 -3
  9. {tgraphx-0.3.0 → tgraphx-0.3.1}/LICENSE +0 -0
  10. {tgraphx-0.3.0 → tgraphx-0.3.1}/README.md +0 -0
  11. {tgraphx-0.3.0 → tgraphx-0.3.1}/setup.cfg +0 -0
  12. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_3d_support.py +0 -0
  13. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_amp_compile.py +0 -0
  14. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_backward_compatibility.py +0 -0
  15. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_benchmark_smoke.py +0 -0
  16. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_chunking.py +0 -0
  17. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dashboard.py +0 -0
  18. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dashboard_metadata.py +0 -0
  19. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dataset_cache.py +0 -0
  20. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dataset_docs_claims.py +0 -0
  21. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dataset_download_mocked.py +0 -0
  22. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dataset_registry.py +0 -0
  23. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_datasets_base.py +0 -0
  24. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_devices.py +0 -0
  25. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_distributed_compat.py +0 -0
  26. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_documentation_claims.py +0 -0
  27. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_edge_features.py +0 -0
  28. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_edge_weight.py +0 -0
  29. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_experiments.py +0 -0
  30. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_explainability.py +0 -0
  31. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_factories.py +0 -0
  32. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_folder_datasets.py +0 -0
  33. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_gat_chunking.py +0 -0
  34. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_gnn_families.py +0 -0
  35. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_gradients.py +0 -0
  36. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_graph.py +0 -0
  37. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_graph_api.py +0 -0
  38. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_graph_builders.py +0 -0
  39. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_graph_transformer_v027.py +0 -0
  40. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_hetero_batch.py +0 -0
  41. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_hetero_layers.py +0 -0
  42. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_hetero_sampling.py +0 -0
  43. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_layers.py +0 -0
  44. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_math.py +0 -0
  45. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_math_invariants_v030.py +0 -0
  46. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_metrics.py +0 -0
  47. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_model_zoo.py +0 -0
  48. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_models.py +0 -0
  49. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_packaging.py +0 -0
  50. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_performance_smoke.py +0 -0
  51. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_pyg_dgl_ogb_wrappers.py +0 -0
  52. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_random_walk_sample.py +0 -0
  53. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_release_validation_v030.py +0 -0
  54. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_sampling.py +0 -0
  55. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_sampling_loaders.py +0 -0
  56. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_temporal_sampling.py +0 -0
  57. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_temporal_v025.py +0 -0
  58. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_torchvision_wrappers.py +0 -0
  59. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_tracking.py +0 -0
  60. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_training.py +0 -0
  61. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_transforms.py +0 -0
  62. {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_v024_features.py +0 -0
  63. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/__init__.py +0 -0
  64. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/dataloader.py +0 -0
  65. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/graph.py +0 -0
  66. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/graph_utils.py +0 -0
  67. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/hetero_batch.py +0 -0
  68. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/hetero_graph.py +0 -0
  69. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/temporal.py +0 -0
  70. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/temporal_batch.py +0 -0
  71. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/utils.py +0 -0
  72. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/dashboard/__init__.py +0 -0
  73. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/dashboard/__main__.py +0 -0
  74. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/dashboard/app.py +0 -0
  75. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/dashboard/static/dashboard.css +0 -0
  76. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/dashboard/static/dashboard.js +0 -0
  77. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/__init__.py +0 -0
  78. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/base.py +0 -0
  79. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/cache.py +0 -0
  80. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/converters.py +0 -0
  81. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/dgl_wrappers.py +0 -0
  82. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/download.py +0 -0
  83. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/errors.py +0 -0
  84. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/metadata.py +0 -0
  85. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/ogb_wrappers.py +0 -0
  86. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/pyg_wrappers.py +0 -0
  87. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/registry.py +0 -0
  88. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/synthetic.py +0 -0
  89. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/torchvision_wrappers.py +0 -0
  90. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/distributed.py +0 -0
  91. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/__init__.py +0 -0
  92. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/callbacks.py +0 -0
  93. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/checkpoints.py +0 -0
  94. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/cli.py +0 -0
  95. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/config.py +0 -0
  96. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/grid.py +0 -0
  97. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/runner.py +0 -0
  98. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/summarize.py +0 -0
  99. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/__init__.py +0 -0
  100. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/attention.py +0 -0
  101. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/edge_attribution.py +0 -0
  102. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/export.py +0 -0
  103. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/integrated_gradients.py +0 -0
  104. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/patch_heatmap.py +0 -0
  105. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/saliency.py +0 -0
  106. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/utils.py +0 -0
  107. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/graph_builders.py +0 -0
  108. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/hetero_sampling.py +0 -0
  109. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/interop.py +0 -0
  110. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/__init__.py +0 -0
  111. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/_dim.py +0 -0
  112. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/_scatter.py +0 -0
  113. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/aggregator.py +0 -0
  114. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/appnp.py +0 -0
  115. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/attention_message.py +0 -0
  116. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/base.py +0 -0
  117. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/conv_message.py +0 -0
  118. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/factory.py +0 -0
  119. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/gat.py +0 -0
  120. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/gatv2.py +0 -0
  121. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/gin.py +0 -0
  122. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/graph_transformer.py +0 -0
  123. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/hetero.py +0 -0
  124. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/hetero_readout.py +0 -0
  125. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/pooling.py +0 -0
  126. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/safe_pool.py +0 -0
  127. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/sage.py +0 -0
  128. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/temporal_readout.py +0 -0
  129. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/transformer_encodings.py +0 -0
  130. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/vector_gcn.py +0 -0
  131. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/learned_graph.py +0 -0
  132. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/__init__.py +0 -0
  133. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/classification.py +0 -0
  134. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/link_prediction.py +0 -0
  135. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/ogb.py +0 -0
  136. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/ranking.py +0 -0
  137. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/regression.py +0 -0
  138. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/reports.py +0 -0
  139. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/__init__.py +0 -0
  140. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/cnn_encoder.py +0 -0
  141. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/cnn_gnn_model.py +0 -0
  142. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/edge_predictor.py +0 -0
  143. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/factory.py +0 -0
  144. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/graph_classifier.py +0 -0
  145. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/hetero_models.py +0 -0
  146. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/model_zoo.py +0 -0
  147. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/node_classifier.py +0 -0
  148. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/pre_encoder.py +0 -0
  149. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/regressors.py +0 -0
  150. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/temporal_models.py +0 -0
  151. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/performance.py +0 -0
  152. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/sampling.py +0 -0
  153. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/sampling_loaders.py +0 -0
  154. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/temporal_sampling.py +0 -0
  155. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/tracking.py +0 -0
  156. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/training.py +0 -0
  157. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/__init__.py +0 -0
  158. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/compose.py +0 -0
  159. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/features.py +0 -0
  160. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/graph.py +0 -0
  161. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/patch.py +0 -0
  162. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/positional.py +0 -0
  163. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/splits.py +0 -0
  164. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/SOURCES.txt +0 -0
  165. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/dependency_links.txt +0 -0
  166. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/entry_points.txt +0 -0
  167. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/requires.txt +0 -0
  168. {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tgraphx
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Tensor-aware graph neural networks preserving spatial node feature layouts
5
5
  Author-email: Arash Sajjadi <arash.sajjadi@usask.ca>
6
6
  Maintainer-email: Arash Sajjadi <arash.sajjadi@usask.ca>
@@ -18,7 +18,6 @@ Classifier: Intended Audience :: Developers
18
18
  Classifier: License :: OSI Approved :: MIT License
19
19
  Classifier: Operating System :: OS Independent
20
20
  Classifier: Programming Language :: Python :: 3
21
- Classifier: Programming Language :: Python :: 3.9
22
21
  Classifier: Programming Language :: Python :: 3.10
23
22
  Classifier: Programming Language :: Python :: 3.11
24
23
  Classifier: Programming Language :: Python :: 3.12
@@ -26,7 +25,7 @@ Classifier: Programming Language :: Python :: 3.13
26
25
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
27
26
  Classifier: Topic :: Scientific/Engineering :: Image Recognition
28
27
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
- Requires-Python: >=3.9
28
+ Requires-Python: >=3.10
30
29
  Description-Content-Type: text/markdown
31
30
  License-File: LICENSE
32
31
  Requires-Dist: torch>=1.13
@@ -5,10 +5,10 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "tgraphx"
7
7
  # Keep this in sync with tgraphx/__init__.py::__version__
8
- version = "0.3.0"
8
+ version = "0.3.1"
9
9
  description = "Tensor-aware graph neural networks preserving spatial node feature layouts"
10
10
  readme = "README.md"
11
- requires-python = ">=3.9"
11
+ requires-python = ">=3.10"
12
12
  license = {text = "MIT"}
13
13
  authors = [
14
14
  {name = "Arash Sajjadi", email = "arash.sajjadi@usask.ca"},
@@ -35,7 +35,6 @@ classifiers = [
35
35
  "License :: OSI Approved :: MIT License",
36
36
  "Operating System :: OS Independent",
37
37
  "Programming Language :: Python :: 3",
38
- "Programming Language :: Python :: 3.9",
39
38
  "Programming Language :: Python :: 3.10",
40
39
  "Programming Language :: Python :: 3.11",
41
40
  "Programming Language :: Python :: 3.12",
@@ -113,6 +113,7 @@ def test_import_performance_from_top():
113
113
 
114
114
  def test_import_model_classes_from_top():
115
115
  from tgraphx import ( # noqa: F401
116
+ CNNEncoder,
116
117
  GraphClassifier,
117
118
  NodeClassifier,
118
119
  EdgePredictor,
@@ -79,7 +79,7 @@ class TestPatchGraph:
79
79
  loss = torch.nn.functional.cross_entropy(logits, batch.graph_labels.long())
80
80
  loss.backward()
81
81
  opt.step()
82
- losses.append(float(loss))
82
+ losses.append(loss.detach().item())
83
83
  assert losses[-1] < losses[0]
84
84
  assert all(torch.isfinite(p.grad).all() for p in model.parameters() if p.grad is not None)
85
85
 
@@ -102,7 +102,7 @@ class TestTinyOverfit:
102
102
  )
103
103
  loss.backward()
104
104
  opt.step()
105
- losses.append(float(loss))
105
+ losses.append(loss.detach().item())
106
106
  assert losses[-1] < losses[0]
107
107
 
108
108
  def test_graph_regression_loss_decreases(self):
@@ -126,7 +126,7 @@ class TestTinyOverfit:
126
126
  )
127
127
  loss.backward()
128
128
  opt.step()
129
- losses.append(float(loss))
129
+ losses.append(loss.detach().item())
130
130
  assert losses[-1] < losses[0]
131
131
 
132
132
  def test_gcn_zoo_classifier_overfits(self):
@@ -151,7 +151,7 @@ class TestTinyOverfit:
151
151
  loss = torch.nn.functional.cross_entropy(logits, labels)
152
152
  loss.backward()
153
153
  opt.step()
154
- losses.append(float(loss))
154
+ losses.append(loss.detach().item())
155
155
  assert losses[-1] < losses[0]
156
156
 
157
157
  def test_gatv2_classifier_finite_gradients(self):
@@ -10,7 +10,7 @@ Common one-liner imports::
10
10
  """
11
11
 
12
12
  # Keep this in sync with [project].version in pyproject.toml.
13
- __version__ = "0.3.0"
13
+ __version__ = "0.3.1"
14
14
 
15
15
  # ── Core data structures ──────────────────────────────────────────────────────
16
16
  from .core.graph import Graph, GraphBatch
@@ -57,6 +57,7 @@ from .layers.factory import make_layer
57
57
  from .models.factory import build_model, build_model_from_config
58
58
 
59
59
  # ── Model classes ─────────────────────────────────────────────────────────────
60
+ from .models.cnn_encoder import CNNEncoder
60
61
  from .models.edge_predictor import EdgePredictor
61
62
  from .models.regressors import NodeRegressor, GraphRegressor
62
63
  from .models.graph_classifier import GraphClassifier
@@ -173,6 +174,7 @@ __all__ = [
173
174
  "build_model",
174
175
  "build_model_from_config",
175
176
  # Model classes
177
+ "CNNEncoder",
176
178
  "EdgePredictor",
177
179
  "NodeRegressor",
178
180
  "GraphRegressor",
@@ -148,6 +148,7 @@ class ImageFolderPatchGraphDataset(InMemoryGraphDataset):
148
148
 
149
149
  def _populate(self) -> None:
150
150
  self._require_pil()
151
+ import numpy as _np
151
152
  from PIL import Image # local import (lazy)
152
153
 
153
154
  graphs: List[Graph] = []
@@ -160,9 +161,9 @@ class ImageFolderPatchGraphDataset(InMemoryGraphDataset):
160
161
  for path in files:
161
162
  with Image.open(path) as im:
162
163
  im = im.convert("RGB")
163
- arr = torch.tensor(
164
- list(im.getdata()), dtype=torch.uint8,
165
- ).view(im.height, im.width, 3).permute(2, 0, 1).contiguous()
164
+ arr = torch.from_numpy(
165
+ _np.array(im, dtype=_np.uint8)
166
+ ).permute(2, 0, 1).contiguous()
166
167
  img = arr.to(dtype=torch.float)
167
168
  if self.normalize:
168
169
  img = img / 255.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tgraphx
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Tensor-aware graph neural networks preserving spatial node feature layouts
5
5
  Author-email: Arash Sajjadi <arash.sajjadi@usask.ca>
6
6
  Maintainer-email: Arash Sajjadi <arash.sajjadi@usask.ca>
@@ -18,7 +18,6 @@ Classifier: Intended Audience :: Developers
18
18
  Classifier: License :: OSI Approved :: MIT License
19
19
  Classifier: Operating System :: OS Independent
20
20
  Classifier: Programming Language :: Python :: 3
21
- Classifier: Programming Language :: Python :: 3.9
22
21
  Classifier: Programming Language :: Python :: 3.10
23
22
  Classifier: Programming Language :: Python :: 3.11
24
23
  Classifier: Programming Language :: Python :: 3.12
@@ -26,7 +25,7 @@ Classifier: Programming Language :: Python :: 3.13
26
25
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
27
26
  Classifier: Topic :: Scientific/Engineering :: Image Recognition
28
27
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
- Requires-Python: >=3.9
28
+ Requires-Python: >=3.10
30
29
  Description-Content-Type: text/markdown
31
30
  License-File: LICENSE
32
31
  Requires-Dist: torch>=1.13
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes