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.
- {tgraphx-0.3.0 → tgraphx-0.3.1}/PKG-INFO +2 -3
- {tgraphx-0.3.0 → tgraphx-0.3.1}/pyproject.toml +2 -3
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_imports.py +1 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_synthetic_datasets.py +1 -1
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_tiny_overfit_v030.py +3 -3
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/__init__.py +3 -1
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/folder.py +4 -3
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/PKG-INFO +2 -3
- {tgraphx-0.3.0 → tgraphx-0.3.1}/LICENSE +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/README.md +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/setup.cfg +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_3d_support.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_amp_compile.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_backward_compatibility.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_benchmark_smoke.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_chunking.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dashboard.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dashboard_metadata.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dataset_cache.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dataset_docs_claims.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dataset_download_mocked.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_dataset_registry.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_datasets_base.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_devices.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_distributed_compat.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_documentation_claims.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_edge_features.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_edge_weight.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_experiments.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_explainability.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_factories.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_folder_datasets.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_gat_chunking.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_gnn_families.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_gradients.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_graph.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_graph_api.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_graph_builders.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_graph_transformer_v027.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_hetero_batch.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_hetero_layers.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_hetero_sampling.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_layers.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_math.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_math_invariants_v030.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_metrics.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_model_zoo.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_models.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_packaging.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_performance_smoke.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_pyg_dgl_ogb_wrappers.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_random_walk_sample.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_release_validation_v030.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_sampling.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_sampling_loaders.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_temporal_sampling.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_temporal_v025.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_torchvision_wrappers.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_tracking.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_training.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_transforms.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tests/test_v024_features.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/__init__.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/dataloader.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/graph.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/graph_utils.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/hetero_batch.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/hetero_graph.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/temporal.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/temporal_batch.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/core/utils.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/dashboard/__init__.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/dashboard/__main__.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/dashboard/app.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/dashboard/static/dashboard.css +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/dashboard/static/dashboard.js +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/__init__.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/base.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/cache.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/converters.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/dgl_wrappers.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/download.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/errors.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/metadata.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/ogb_wrappers.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/pyg_wrappers.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/registry.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/synthetic.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/datasets/torchvision_wrappers.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/distributed.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/__init__.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/callbacks.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/checkpoints.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/cli.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/config.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/grid.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/runner.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/experiments/summarize.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/__init__.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/attention.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/edge_attribution.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/export.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/integrated_gradients.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/patch_heatmap.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/saliency.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/explain/utils.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/graph_builders.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/hetero_sampling.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/interop.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/__init__.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/_dim.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/_scatter.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/aggregator.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/appnp.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/attention_message.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/base.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/conv_message.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/factory.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/gat.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/gatv2.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/gin.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/graph_transformer.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/hetero.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/hetero_readout.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/pooling.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/safe_pool.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/sage.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/temporal_readout.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/transformer_encodings.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/layers/vector_gcn.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/learned_graph.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/__init__.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/classification.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/link_prediction.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/ogb.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/ranking.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/regression.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/metrics/reports.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/__init__.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/cnn_encoder.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/cnn_gnn_model.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/edge_predictor.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/factory.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/graph_classifier.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/hetero_models.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/model_zoo.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/node_classifier.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/pre_encoder.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/regressors.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/models/temporal_models.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/performance.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/sampling.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/sampling_loaders.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/temporal_sampling.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/tracking.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/training.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/__init__.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/compose.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/features.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/graph.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/patch.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/positional.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx/transforms/splits.py +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/SOURCES.txt +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/dependency_links.txt +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/entry_points.txt +0 -0
- {tgraphx-0.3.0 → tgraphx-0.3.1}/tgraphx.egg-info/requires.txt +0 -0
- {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.
|
|
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.
|
|
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.
|
|
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.
|
|
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",
|
|
@@ -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(
|
|
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(
|
|
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(
|
|
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(
|
|
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.
|
|
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.
|
|
164
|
-
|
|
165
|
-
).
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|