tgraphx 1.3.4__tar.gz → 1.3.6__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-1.3.4/tgraphx.egg-info → tgraphx-1.3.6}/PKG-INFO +13 -4
- {tgraphx-1.3.4 → tgraphx-1.3.6}/README.md +12 -3
- {tgraphx-1.3.4 → tgraphx-1.3.6}/pyproject.toml +1 -1
- tgraphx-1.3.6/tests/test_colab_notebook_regressions_v136.py +407 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_colab_regressions_v134.py +2 -2
- tgraphx-1.3.6/tests/test_colab_regressions_v135.py +654 -0
- tgraphx-1.3.6/tests/test_llm_predictability_v136.py +352 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_notebooks_v130.py +8 -1
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/__init__.py +7 -5
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/__init__.py +2 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/algorithms.py +21 -1
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/fitness.py +24 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/generation/high_level_api.py +42 -8
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/trainer.py +125 -4
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/conv_message.py +12 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/structural.py +5 -0
- tgraphx-1.3.6/tgraphx/models/knowledge_graph.py +33 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/__init__.py +2 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/environments/__init__.py +2 -1
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/environments/max_cut.py +61 -1
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/high_level_api.py +19 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6/tgraphx.egg-info}/PKG-INFO +13 -4
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx.egg-info/SOURCES.txt +4 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/LICENSE +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/setup.cfg +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_3d_support.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_algorithms.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_amp_compile.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_api_stability_labels.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_backward_compatibility.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_benchmark_smoke.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_calibration.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_chunking.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_cluster_gcn.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_continuous_rl_algorithms.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_dashboard.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_dashboard_metadata.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_dataset_cache.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_dataset_docs_claims.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_dataset_download_mocked.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_dataset_registry.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_datasets_base.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_devices.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_distributed_compat.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_distributed_helpers.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_distributed_smoke.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_documentation_claims.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_edge_features.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_edge_weight.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_estimators_v05.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_evolutionary_graph_optimization.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_evolutionary_history_v132.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_experiments.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_explainability.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_factories.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_folder_datasets.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_gat_chunking.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_generation_rl_benchmarks_smoke.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_gnn_families.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_gradients.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graph.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graph_action_spaces.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graph_api.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graph_builders.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graph_generation_data_model.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graph_generation_metrics.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graph_rl_algorithms.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graph_rl_environments.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graph_transformer_v027.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graph_utils.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_graphsaint.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_han_hgt_overfit.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_hard_negative_sampling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_hetero_batch.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_hetero_layers.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_hetero_layers_v05.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_hetero_sampling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_imports.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_io_graphml_v120.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_benchmarks_smoke.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_data_model.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_datasets.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_evaluation.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_feature_aware_v131.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_gnn_integration.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_hpo_v130.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_models.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_multimodal.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_negative_sampling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_reasoning.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_rescal_v120.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_simple_v130.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_temporal.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_kg_training.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_layers.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_loader_feature_store_integration.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_loader_robustness_v110.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_loaders_feature_store.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_matching_coloring_flow.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_math.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_math_correctness_v110.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_math_invariants_v030.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_metrics.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_mining_centrality.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_mining_core.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_mining_generators_spectral.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_mining_graph_learning.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_mining_paths_algorithms.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_mining_structural.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_model_zoo.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_models.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_negative_sampling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_neural_mining.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_neural_mining_batched.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_node2vec_kg_hypergraph.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_ogb_tgb_wrappers.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_packaging.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_performance_smoke.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_plotting.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_public_benchmarks.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_pyg_dgl_ogb_wrappers.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_random_walk_sample.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_readme_links.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_release_validation_v030.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_reproducibility.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_reproducibility_easy_v133.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_rl_baselines.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_rl_callbacks_v120.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_rl_high_level_api.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_rollout_buffer.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_sampling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_sampling_loaders.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_sparse_backend_select.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_sparse_vgae_rgcn.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_synthetic_datasets.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_temporal_sampling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_temporal_v025.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_temporal_v05.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_tgn_tgat_overfit.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_time_encoding.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_tiny_overfit_v030.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_torchvision_wrappers.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_tracking.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_training.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_transforms.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_user_friendly_llm_snippets.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tests/test_v024_features.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/__main__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/algorithms/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/algorithms/connectivity.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/algorithms/structural.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/algorithms/traversal.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/benchmarks/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/benchmarks/public.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/benchmarks/run_v13_benchmark_suite.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/benchmarks/suite.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/calibration.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/cluster_gcn.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/core/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/core/dataloader.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/core/graph.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/core/graph_utils.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/core/hetero_batch.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/core/hetero_graph.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/core/temporal.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/core/temporal_batch.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/core/utils.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/dashboard/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/dashboard/__main__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/dashboard/app.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/dashboard/static/dashboard.css +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/dashboard/static/dashboard.js +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/base.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/cache.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/converters.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/dgl_wrappers.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/download.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/errors.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/folder.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/metadata.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/ogb_wrappers.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/pyg_wrappers.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/registry.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/synthetic.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/datasets/torchvision_wrappers.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/distributed.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/doctor.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/easy/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/easy/_data.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/easy/_diagnostics.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/easy/_discovery.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/easy/_exceptions.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/easy/_models.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/easy/_results.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/easy/_workflows.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/estimators/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/estimators/base.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/estimators/early_stopping.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/estimators/label_propagation.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/estimators/node2vec.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/estimators/splits.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/estimators/vgae.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/config.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/genome.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/high_level_api.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/metrics.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/multi_objective.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/operators.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/reports.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/evolutionary/selection.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/experiments/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/experiments/callbacks.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/experiments/checkpoints.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/experiments/cli.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/experiments/config.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/experiments/grid.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/experiments/runner.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/experiments/summarize.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/explain/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/explain/attention.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/explain/edge_attribution.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/explain/export.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/explain/integrated_gradients.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/explain/patch_heatmap.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/explain/saliency.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/explain/utils.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/feature_store.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/generation/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/generation/actions.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/generation/classical.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/generation/config.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/generation/data_model.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/generation/metrics.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/generation/neural.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/generation/projectors.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/generation/reports.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/graph_builders.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/graphsaint.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/hetero_sampling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/interop.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/io/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/io/graphml.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/data.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/datasets.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/evaluation.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/gnn.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/hpo.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/losses.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/models.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/multimodal.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/projectors.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/reasoning.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/reports.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/sampling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/kg/temporal.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/_dim.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/_scatter.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/aggregator.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/appnp.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/attention_message.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/base.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/factory.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/gat.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/gatv2.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/gin.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/graph_transformer.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/han.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/hetero.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/hetero_readout.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/hgt.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/pooling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/rgcn.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/safe_pool.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/sage.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/temporal_readout.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/transformer_encodings.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/layers/vector_gcn.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/learned_graph.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/loaders.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/metrics/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/metrics/classification.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/metrics/link_prediction.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/metrics/ogb.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/metrics/ranking.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/metrics/regression.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/metrics/reports.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/anomaly.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/api.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/centrality.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/communities.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/embeddings.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/frequent.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/generators.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/graph_io.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/graph_learning.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/hetero.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/hypergraph.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/kernels.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/knowledge_graph.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/label_prop.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/link_prediction.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/matching_coloring.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/motifs.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/neural.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/node2vec.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/paths.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/patterns.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/prototype.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/random_walk.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/reports.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/sequence_models.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/similarity.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/spectral.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/structural_encodings.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/temporal.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/mining/vgae.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/cnn_encoder.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/cnn_gnn_model.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/edge_predictor.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/factory.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/graph_classifier.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/hetero_models.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/model_zoo.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/node_classifier.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/pre_encoder.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/regressors.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/models/temporal_models.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/performance.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/plotting/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/plotting/graph.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/plotting/layouts.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/plotting/mining.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/plotting/utils.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/reproducibility.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/algorithms/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/algorithms/actor_critic.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/algorithms/base.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/algorithms/baselines.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/algorithms/continuous.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/algorithms/dqn.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/algorithms/ppo.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/algorithms/reinforce.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/algorithms/replay_buffer.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/callbacks.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/config.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/environments/base.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/environments/coloring.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/environments/continuous.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/environments/generation.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/environments/kg_reasoning.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/environments/navigation.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/environments/shortest_path.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/environments/vertex_cover.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/exploration/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/exploration/strategies.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/metrics.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/networks/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/networks/actor_critic.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/networks/policy.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/networks/projectors.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/networks/qnetwork.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/networks/value.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/rl/reports.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/sampling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/sampling_loaders.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/sampling_negative.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/sparse.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/temporal/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/temporal/tgat.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/temporal/tgn.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/temporal/time_encoding.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/temporal_sampling.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/tracking.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/training.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/transforms/__init__.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/transforms/compose.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/transforms/features.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/transforms/graph.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/transforms/patch.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/transforms/positional.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx/transforms/splits.py +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx.egg-info/dependency_links.txt +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx.egg-info/entry_points.txt +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx.egg-info/requires.txt +0 -0
- {tgraphx-1.3.4 → tgraphx-1.3.6}/tgraphx.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tgraphx
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.6
|
|
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>
|
|
@@ -195,10 +195,19 @@ out = layer(g.node_features, g.edge_index) # [6, 32, 8, 8]
|
|
|
195
195
|
out.sum().backward()
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
|
|
199
|
-
[](https://colab.research.google.com/drive/1agls1xtqE5WxbWthcG0HEa3Gbk3fvoCD?usp=sharing)
|
|
198
|
+
## Notebook gallery
|
|
200
199
|
|
|
201
|
-
|
|
200
|
+
A curated set of 30 CPU-runnable notebooks covers Easy Mode, tensor-native
|
|
201
|
+
message passing, sampling, knowledge graphs, classical graph generation,
|
|
202
|
+
evolutionary optimization, graph reinforcement learning, graph IO, graph
|
|
203
|
+
mining, benchmarking, and reproducibility.
|
|
204
|
+
|
|
205
|
+
Browse the full index → **[docs/colab_gallery.md](docs/colab_gallery.md)**
|
|
206
|
+
|
|
207
|
+
Each notebook focuses on one concept, uses synthetic or toy data, and runs in
|
|
208
|
+
under two minutes on CPU. Notebooks are hosted on Google Drive; open the file
|
|
209
|
+
in Drive and choose **Open with → Google Colaboratory**, or download and run
|
|
210
|
+
locally in Jupyter.
|
|
202
211
|
|
|
203
212
|
---
|
|
204
213
|
|
|
@@ -140,10 +140,19 @@ out = layer(g.node_features, g.edge_index) # [6, 32, 8, 8]
|
|
|
140
140
|
out.sum().backward()
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
[](https://colab.research.google.com/drive/1agls1xtqE5WxbWthcG0HEa3Gbk3fvoCD?usp=sharing)
|
|
143
|
+
## Notebook gallery
|
|
145
144
|
|
|
146
|
-
|
|
145
|
+
A curated set of 30 CPU-runnable notebooks covers Easy Mode, tensor-native
|
|
146
|
+
message passing, sampling, knowledge graphs, classical graph generation,
|
|
147
|
+
evolutionary optimization, graph reinforcement learning, graph IO, graph
|
|
148
|
+
mining, benchmarking, and reproducibility.
|
|
149
|
+
|
|
150
|
+
Browse the full index → **[docs/colab_gallery.md](docs/colab_gallery.md)**
|
|
151
|
+
|
|
152
|
+
Each notebook focuses on one concept, uses synthetic or toy data, and runs in
|
|
153
|
+
under two minutes on CPU. Notebooks are hosted on Google Drive; open the file
|
|
154
|
+
in Drive and choose **Open with → Google Colaboratory**, or download and run
|
|
155
|
+
locally in Jupyter.
|
|
147
156
|
|
|
148
157
|
---
|
|
149
158
|
|
|
@@ -5,7 +5,7 @@ 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 = "1.3.
|
|
8
|
+
version = "1.3.6"
|
|
9
9
|
description = "Tensor-aware graph neural networks preserving spatial node feature layouts"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.10"
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
"""Colab notebook regression tests (v1.3.6).
|
|
2
|
+
|
|
3
|
+
These tests pin the **exact public Colab notebook code paths** that were
|
|
4
|
+
reported as broken in the v1.3.5 → v1.3.6 sprint. They guard against:
|
|
5
|
+
|
|
6
|
+
- Notebook 14 still using `composite_fitness` directly with NSGA-II.
|
|
7
|
+
- Notebook 19 still slicing `ValueError` objects.
|
|
8
|
+
- Notebook 22 still asserting `max_degree == 4` on a bidirectional graph.
|
|
9
|
+
- Notebook 24 still spawning subprocesses against `benchmarks/run_v13_benchmark_suite.py`.
|
|
10
|
+
- README still containing the stale single-Colab-link sentence.
|
|
11
|
+
|
|
12
|
+
Tests must be CPU-safe, fast, no network, and not assume a repo checkout.
|
|
13
|
+
"""
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import math
|
|
18
|
+
import os
|
|
19
|
+
import subprocess
|
|
20
|
+
import sys
|
|
21
|
+
import tempfile
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
import pytest
|
|
25
|
+
import torch
|
|
26
|
+
import torch.nn.functional as F
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# ── Public-source surfaces scanned for stale snippets ────────────────────────
|
|
30
|
+
|
|
31
|
+
_PUBLIC_DIRS_AND_FILES = [
|
|
32
|
+
Path("README.md"),
|
|
33
|
+
Path("docs"),
|
|
34
|
+
Path("tutorials"),
|
|
35
|
+
Path("examples"),
|
|
36
|
+
Path("tools/generate_colab_drafts.py"),
|
|
37
|
+
Path("tools/generate_notebooks.py"),
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _iter_public_text_files():
|
|
42
|
+
"""Yield every public-facing text source file that ships notebook code."""
|
|
43
|
+
suffixes = {".md", ".py", ".ipynb", ".json", ".txt"}
|
|
44
|
+
for entry in _PUBLIC_DIRS_AND_FILES:
|
|
45
|
+
if not entry.exists():
|
|
46
|
+
continue
|
|
47
|
+
if entry.is_file():
|
|
48
|
+
yield entry
|
|
49
|
+
continue
|
|
50
|
+
for path in entry.rglob("*"):
|
|
51
|
+
if path.is_file() and path.suffix in suffixes:
|
|
52
|
+
yield path
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _grep_public_sources(needle: str):
|
|
56
|
+
"""Return list of (path, line_number, line) for occurrences in public sources."""
|
|
57
|
+
hits = []
|
|
58
|
+
for path in _iter_public_text_files():
|
|
59
|
+
try:
|
|
60
|
+
text = path.read_text(encoding="utf-8", errors="replace")
|
|
61
|
+
except OSError:
|
|
62
|
+
continue
|
|
63
|
+
for i, line in enumerate(text.splitlines(), start=1):
|
|
64
|
+
if needle in line:
|
|
65
|
+
hits.append((path, i, line))
|
|
66
|
+
return hits
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
# ── Bug A — Notebook 14: NSGA-II composite_fitness misuse ─────────────────────
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class TestNotebook14NSGAII:
|
|
73
|
+
"""The corrected NSGA-II snippet must run; the broken pattern must not appear."""
|
|
74
|
+
|
|
75
|
+
def _make_genome(self, seed=0):
|
|
76
|
+
from tgraphx.evolutionary import GraphGenome
|
|
77
|
+
torch.manual_seed(seed)
|
|
78
|
+
return GraphGenome(edge_index=torch.randint(0, 8, (2, 10)), num_nodes=8)
|
|
79
|
+
|
|
80
|
+
def test_corrected_snippet_runs(self):
|
|
81
|
+
"""Exact corrected v1.3.6 notebook 14 NSGA-II snippet."""
|
|
82
|
+
from tgraphx.evolutionary import (
|
|
83
|
+
NSGAIIOptimizer, EvolutionConfig,
|
|
84
|
+
connectivity_fitness, sparsity_fitness,
|
|
85
|
+
)
|
|
86
|
+
config2 = EvolutionConfig(population_size=8, n_generations=3, seed=0)
|
|
87
|
+
pop2 = [self._make_genome(i) for i in range(8)]
|
|
88
|
+
objectives = [connectivity_fitness, sparsity_fitness]
|
|
89
|
+
r2 = NSGAIIOptimizer(config2, objectives).optimize(pop2)
|
|
90
|
+
assert r2.pareto_front is not None and len(r2.pareto_front) >= 1
|
|
91
|
+
assert len(r2.history) > 0
|
|
92
|
+
|
|
93
|
+
def test_composite_fitness_direct_raises(self):
|
|
94
|
+
"""Passing composite_fitness directly must still raise helpful TypeError."""
|
|
95
|
+
from tgraphx.evolutionary import (
|
|
96
|
+
NSGAIIOptimizer, EvolutionConfig, composite_fitness,
|
|
97
|
+
)
|
|
98
|
+
with pytest.raises(TypeError) as exc_info:
|
|
99
|
+
NSGAIIOptimizer(
|
|
100
|
+
EvolutionConfig(population_size=4, n_generations=2, seed=0),
|
|
101
|
+
composite_fitness,
|
|
102
|
+
)
|
|
103
|
+
msg = str(exc_info.value)
|
|
104
|
+
assert "NSGAIIOptimizer expects" in msg
|
|
105
|
+
assert "GeneticAlgorithmOptimizer" in msg
|
|
106
|
+
|
|
107
|
+
def test_no_stale_nsga_snippet_in_public_sources(self):
|
|
108
|
+
"""No public source file may contain the broken NSGA-II call form."""
|
|
109
|
+
hits = _grep_public_sources("NSGAIIOptimizer(config2, composite_fitness)")
|
|
110
|
+
# Filter out test files that intentionally document the bad pattern.
|
|
111
|
+
non_test = [(p, i, l) for (p, i, l) in hits if "tests" not in p.parts]
|
|
112
|
+
assert not non_test, f"Stale NSGA-II snippet found: {non_test}"
|
|
113
|
+
|
|
114
|
+
def test_no_stale_nsga_comment_in_public_sources(self):
|
|
115
|
+
hits = _grep_public_sources("composite_fitness optimizes multiple objectives")
|
|
116
|
+
non_test = [(p, i, l) for (p, i, l) in hits if "tests" not in p.parts]
|
|
117
|
+
assert not non_test, f"Misleading NSGA-II comment found: {non_test}"
|
|
118
|
+
|
|
119
|
+
def test_colab_draft_14_uses_objective_list(self):
|
|
120
|
+
"""If colab_drafts/14_*.ipynb exists, it must use the corrected snippet."""
|
|
121
|
+
path = Path("colab_drafts/14_graph_generation_evolutionary_optimization.ipynb")
|
|
122
|
+
if not path.exists():
|
|
123
|
+
pytest.skip("colab_drafts/14_*.ipynb not present (gitignored)")
|
|
124
|
+
nb = json.loads(path.read_text())
|
|
125
|
+
srcs = ["".join(c["source"]) for c in nb["cells"]]
|
|
126
|
+
joined = "\n".join(srcs)
|
|
127
|
+
assert "NSGAIIOptimizer(config2, composite_fitness)" not in joined
|
|
128
|
+
assert "objectives" in joined or "connectivity_fitness" in joined
|
|
129
|
+
assert "sparsity_fitness" in joined or "[connectivity_fitness" in joined
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
# ── Bug B — Notebook 19: GraphML str(e)[:120] formatting ─────────────────────
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class TestNotebook19GraphML:
|
|
136
|
+
"""The corrected GraphML notebook code must use str(e)[:120], not e[:120]."""
|
|
137
|
+
|
|
138
|
+
def test_str_e_slicing_works(self, tmp_path):
|
|
139
|
+
from tgraphx import Graph
|
|
140
|
+
from tgraphx.io import write_graphml
|
|
141
|
+
x_spatial = torch.randn(4, 3, 8, 8)
|
|
142
|
+
g = Graph(node_features=x_spatial, edge_index=torch.tensor([[0, 1], [1, 2]]))
|
|
143
|
+
try:
|
|
144
|
+
write_graphml(g, str(tmp_path / "x.graphml"), include_tensor_features=True)
|
|
145
|
+
pytest.fail("Expected ValueError")
|
|
146
|
+
except ValueError as e:
|
|
147
|
+
msg = str(e)[:120]
|
|
148
|
+
assert isinstance(msg, str)
|
|
149
|
+
assert len(msg) <= 120
|
|
150
|
+
assert "GraphML" in msg or "node_features" in msg
|
|
151
|
+
|
|
152
|
+
def test_no_public_e_slicing(self):
|
|
153
|
+
"""No public source may slice an exception object directly."""
|
|
154
|
+
hits = _grep_public_sources("e[:120]")
|
|
155
|
+
# The pattern matches both `e[:120]` and `str(e)[:120]`. Filter out
|
|
156
|
+
# the safe form and the changelog/test entries.
|
|
157
|
+
bad = [
|
|
158
|
+
(p, i, l) for (p, i, l) in hits
|
|
159
|
+
if "tests" not in p.parts
|
|
160
|
+
and "CHANGELOG" not in p.name
|
|
161
|
+
and "str(e)[:120]" not in l
|
|
162
|
+
and "str(err)[:120]" not in l
|
|
163
|
+
]
|
|
164
|
+
assert not bad, f"Public sources still slice exception objects: {bad}"
|
|
165
|
+
|
|
166
|
+
def test_colab_draft_19_uses_str_e(self):
|
|
167
|
+
"""colab_drafts/19_*.ipynb must use str(e)[:120], not e[:120]."""
|
|
168
|
+
path = Path("colab_drafts/19_io_tensor_semantics_warning.ipynb")
|
|
169
|
+
if not path.exists():
|
|
170
|
+
pytest.skip("colab_drafts/19_*.ipynb not present (gitignored)")
|
|
171
|
+
nb = json.loads(path.read_text())
|
|
172
|
+
joined = "\n".join("".join(c["source"]) for c in nb["cells"])
|
|
173
|
+
assert "str(e)[:120]" in joined
|
|
174
|
+
# No raw exception slicing.
|
|
175
|
+
for bad in (" e[:120]", "(e[:120]"):
|
|
176
|
+
assert bad not in joined, f"Found {bad!r} in colab_drafts/19"
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
# ── Bug C — Notebook 24: Benchmark must use package API, not repo path ────────
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
class TestNotebook24Benchmark:
|
|
183
|
+
"""Notebook 24 must call the package-level API, not a repo-local script."""
|
|
184
|
+
|
|
185
|
+
def test_package_api_importable(self):
|
|
186
|
+
from tgraphx.benchmarks import run_v13_benchmark_suite
|
|
187
|
+
assert callable(run_v13_benchmark_suite)
|
|
188
|
+
|
|
189
|
+
def test_returns_dict_with_required_keys(self):
|
|
190
|
+
from tgraphx.benchmarks import run_v13_benchmark_suite
|
|
191
|
+
data = run_v13_benchmark_suite(small=True, return_dict=True)
|
|
192
|
+
for k in ("suite", "package_version", "benchmarks"):
|
|
193
|
+
assert k in data, f"Missing key {k!r}"
|
|
194
|
+
for row in data["benchmarks"]:
|
|
195
|
+
assert "name" in row and "status" in row
|
|
196
|
+
|
|
197
|
+
def test_runs_outside_repo_tree(self, tmp_path):
|
|
198
|
+
"""Must work when cwd is outside the TGraphX repository."""
|
|
199
|
+
old = os.getcwd()
|
|
200
|
+
os.chdir(tmp_path)
|
|
201
|
+
try:
|
|
202
|
+
from tgraphx.benchmarks import run_v13_benchmark_suite
|
|
203
|
+
data = run_v13_benchmark_suite(small=True, return_dict=True)
|
|
204
|
+
assert "benchmarks" in data and len(data["benchmarks"]) > 0
|
|
205
|
+
finally:
|
|
206
|
+
os.chdir(old)
|
|
207
|
+
|
|
208
|
+
def test_python_m_cli(self, tmp_path):
|
|
209
|
+
"""python -m tgraphx.benchmarks.run_v13_benchmark_suite --small --json works."""
|
|
210
|
+
result = subprocess.run(
|
|
211
|
+
[sys.executable, "-m", "tgraphx.benchmarks.run_v13_benchmark_suite",
|
|
212
|
+
"--small", "--json"],
|
|
213
|
+
capture_output=True, text=True, cwd=str(tmp_path),
|
|
214
|
+
)
|
|
215
|
+
assert result.returncode == 0, f"CLI failed:\n{result.stderr[:400]}"
|
|
216
|
+
data = json.loads(result.stdout)
|
|
217
|
+
assert "benchmarks" in data
|
|
218
|
+
|
|
219
|
+
def test_no_stale_repo_path_in_public_sources(self):
|
|
220
|
+
"""No public notebook/doc source may reference benchmarks/run_v13_benchmark_suite.py."""
|
|
221
|
+
hits = _grep_public_sources("benchmarks/run_v13_benchmark_suite.py")
|
|
222
|
+
bad = [
|
|
223
|
+
(p, i, l) for (p, i, l) in hits
|
|
224
|
+
if "tests" not in p.parts
|
|
225
|
+
and "CHANGELOG" not in p.name
|
|
226
|
+
]
|
|
227
|
+
assert not bad, f"Stale repo-local benchmark path found: {bad}"
|
|
228
|
+
|
|
229
|
+
def test_colab_draft_24_uses_package_api(self):
|
|
230
|
+
path = Path("colab_drafts/24_benchmark_suite_v13.ipynb")
|
|
231
|
+
if not path.exists():
|
|
232
|
+
pytest.skip("colab_drafts/24_*.ipynb not present (gitignored)")
|
|
233
|
+
nb = json.loads(path.read_text())
|
|
234
|
+
joined = "\n".join("".join(c["source"]) for c in nb["cells"])
|
|
235
|
+
assert "from tgraphx.benchmarks import run_v13_benchmark_suite" in joined
|
|
236
|
+
assert "subprocess" not in joined
|
|
237
|
+
assert "benchmarks/run_v13_benchmark_suite.py" not in joined
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
# ── Bug D — Notebook 22: structural-role degree assertions ────────────────────
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
class TestNotebook22StructuralRoles:
|
|
244
|
+
"""Notebook 22 must not assert max_degree == 4 on a bidirectional star."""
|
|
245
|
+
|
|
246
|
+
def test_corrected_snippet_runs(self):
|
|
247
|
+
from tgraphx.mining import degree_statistics
|
|
248
|
+
|
|
249
|
+
star_ei = torch.tensor(
|
|
250
|
+
[[0, 0, 0, 0, 1, 2, 3, 4], [1, 2, 3, 4, 0, 0, 0, 0]], dtype=torch.long,
|
|
251
|
+
)
|
|
252
|
+
star_degree = degree_statistics(star_ei, num_nodes=5)
|
|
253
|
+
assert star_degree["max_total_degree"] == 8
|
|
254
|
+
assert star_degree["min_total_degree"] == 2
|
|
255
|
+
|
|
256
|
+
def test_degree_aliases_present(self):
|
|
257
|
+
from tgraphx.mining.structural import degree_statistics
|
|
258
|
+
stats = degree_statistics(
|
|
259
|
+
torch.tensor([[0, 1], [1, 0]], dtype=torch.long), num_nodes=2
|
|
260
|
+
)
|
|
261
|
+
for k in ("min_degree", "max_degree", "mean_degree"):
|
|
262
|
+
assert k in stats
|
|
263
|
+
|
|
264
|
+
def test_no_stale_assertion_in_public_sources(self):
|
|
265
|
+
"""No public source may contain the broken bidirectional-star assertion."""
|
|
266
|
+
for needle in (
|
|
267
|
+
"assert star_degree['max_degree'] == 4",
|
|
268
|
+
'assert star_degree["max_degree"] == 4',
|
|
269
|
+
):
|
|
270
|
+
hits = _grep_public_sources(needle)
|
|
271
|
+
bad = [(p, i, l) for (p, i, l) in hits if "tests" not in p.parts]
|
|
272
|
+
assert not bad, f"Stale assertion {needle!r}: {bad}"
|
|
273
|
+
|
|
274
|
+
def test_colab_draft_22_uses_total_degree(self):
|
|
275
|
+
path = Path("colab_drafts/22_structural_roles_concept_demo.ipynb")
|
|
276
|
+
if not path.exists():
|
|
277
|
+
pytest.skip("colab_drafts/22_*.ipynb not present (gitignored)")
|
|
278
|
+
nb = json.loads(path.read_text())
|
|
279
|
+
joined = "\n".join("".join(c["source"]) for c in nb["cells"])
|
|
280
|
+
assert "max_total_degree" in joined
|
|
281
|
+
assert "assert star_degree['max_degree'] == 4" not in joined
|
|
282
|
+
assert 'assert star_degree["max_degree"] == 4' not in joined
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
# ── Bug E — README / docs gallery consolidation ───────────────────────────────
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
class TestReadmeAndGalleryConsolidation:
|
|
289
|
+
|
|
290
|
+
def test_no_old_colab_single_tutorial_sentence(self):
|
|
291
|
+
text = Path("README.md").read_text()
|
|
292
|
+
assert "A Colab tutorial walks through every workflow" not in text
|
|
293
|
+
|
|
294
|
+
def test_readme_has_notebook_gallery_section(self):
|
|
295
|
+
text = Path("README.md").read_text()
|
|
296
|
+
assert "Notebook Gallery" in text or "Notebook gallery" in text
|
|
297
|
+
|
|
298
|
+
def test_readme_links_to_colab_gallery(self):
|
|
299
|
+
text = Path("README.md").read_text()
|
|
300
|
+
assert "colab_gallery.md" in text
|
|
301
|
+
|
|
302
|
+
def test_docs_index_links_colab_gallery(self):
|
|
303
|
+
text = Path("docs/index.md").read_text()
|
|
304
|
+
assert "colab_gallery.md" in text
|
|
305
|
+
|
|
306
|
+
def test_no_public_source_has_stale_colab_sentence(self):
|
|
307
|
+
hits = _grep_public_sources("A Colab tutorial walks through every workflow")
|
|
308
|
+
bad = [(p, i, l) for (p, i, l) in hits
|
|
309
|
+
if "tests" not in p.parts and "CHANGELOG" not in p.name]
|
|
310
|
+
assert not bad, f"Stale Colab sentence remains: {bad}"
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
# ── Bug F — ConvMessagePassing out_shape with NeighborLoader ──────────────────
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
class TestConvMessagePassingNeighborLoaderSeedLoss:
|
|
317
|
+
|
|
318
|
+
def test_full_v136_colab_smoke(self):
|
|
319
|
+
from tgraphx import Graph, ConvMessagePassing
|
|
320
|
+
from tgraphx.loaders import NeighborLoader
|
|
321
|
+
from tgraphx.reproducibility import set_seed
|
|
322
|
+
import torch.nn as nn
|
|
323
|
+
|
|
324
|
+
set_seed(42)
|
|
325
|
+
|
|
326
|
+
N = 128
|
|
327
|
+
x = torch.randn(N, 16, 8, 8)
|
|
328
|
+
edge_index = torch.randint(0, N, (2, 1000))
|
|
329
|
+
y = torch.randint(0, 10, (N,))
|
|
330
|
+
g = Graph(node_features=x, edge_index=edge_index, y=y)
|
|
331
|
+
|
|
332
|
+
class SimpleTModel(nn.Module):
|
|
333
|
+
def __init__(self):
|
|
334
|
+
super().__init__()
|
|
335
|
+
self.conv1 = ConvMessagePassing(in_shape=(16, 8, 8), out_shape=(32, 8, 8))
|
|
336
|
+
self.conv2 = ConvMessagePassing(in_shape=(32, 8, 8), out_shape=(64, 4, 4))
|
|
337
|
+
self.cls = nn.Linear(64 * 4 * 4, 10)
|
|
338
|
+
|
|
339
|
+
def forward(self, x, edge_index):
|
|
340
|
+
x = self.conv1(x, edge_index)
|
|
341
|
+
x = torch.relu(x)
|
|
342
|
+
x = self.conv2(x, edge_index)
|
|
343
|
+
assert x.shape[1:] == (64, 4, 4), x.shape
|
|
344
|
+
x = x.reshape(x.size(0), -1)
|
|
345
|
+
return self.cls(x)
|
|
346
|
+
|
|
347
|
+
model = SimpleTModel()
|
|
348
|
+
loader = NeighborLoader(graph=g, fanouts=[10, 5], batch_size=32,
|
|
349
|
+
shuffle=True, seed=42)
|
|
350
|
+
batch = next(iter(loader))
|
|
351
|
+
logits = model(batch.node_features, batch.edge_index)
|
|
352
|
+
loss = F.cross_entropy(batch.seed_logits(logits), batch.seed_y)
|
|
353
|
+
loss.backward()
|
|
354
|
+
assert math.isfinite(loss.item())
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
# ── Bug G — Reproducibility CPU strict mode ──────────────────────────────────
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
class TestReproducibilityCPU:
|
|
361
|
+
|
|
362
|
+
def _run(self):
|
|
363
|
+
import tgraphx as tgx
|
|
364
|
+
from tgraphx.reproducibility import set_seed
|
|
365
|
+
set_seed(42, deterministic=True)
|
|
366
|
+
data = tgx.easy.synthetic_tensor_node_classification(
|
|
367
|
+
num_nodes=48, node_shape=(4, 4, 4), num_classes=3,
|
|
368
|
+
num_edges=200, seed=42,
|
|
369
|
+
)
|
|
370
|
+
return tgx.easy.train_node_classifier(
|
|
371
|
+
data, epochs=2, batch_size=16, fanouts=[5, 3],
|
|
372
|
+
verbose=False, seed=42, deterministic=True, device="cpu",
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
def test_deterministic_cpu_exact_match(self):
|
|
376
|
+
r1 = self._run()
|
|
377
|
+
r2 = self._run()
|
|
378
|
+
diff = abs(r1.metrics["loss"] - r2.metrics["loss"])
|
|
379
|
+
assert diff < 1e-7, f"CPU deterministic diff too large: {diff:.2e}"
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
# ── Bug H — Mining and KG public APIs ────────────────────────────────────────
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
class TestMiningAndKGPublicAPIs:
|
|
386
|
+
|
|
387
|
+
def test_mining_imports(self):
|
|
388
|
+
from tgraphx.mining import (
|
|
389
|
+
motif_profile, graph_summary, degree_statistics, centrality_summary,
|
|
390
|
+
)
|
|
391
|
+
from tgraphx.mining.kernels import wl_subtree_kernel
|
|
392
|
+
assert all(callable(f) for f in (
|
|
393
|
+
motif_profile, graph_summary, degree_statistics,
|
|
394
|
+
centrality_summary, wl_subtree_kernel,
|
|
395
|
+
))
|
|
396
|
+
|
|
397
|
+
def test_feature_aware_kg_scoring(self):
|
|
398
|
+
from tgraphx.kg import KnowledgeGraph, TransEModel
|
|
399
|
+
N_e, N_r, N_t = 10, 3, 6
|
|
400
|
+
triples = torch.randint(0, N_e, (N_t, 3))
|
|
401
|
+
triples[:, 1] = torch.randint(0, N_r, (N_t,))
|
|
402
|
+
kg = KnowledgeGraph(triples, num_entities=N_e, num_relations=N_r)
|
|
403
|
+
kg.entity_features = {"visual": torch.randn(N_e, 32)}
|
|
404
|
+
model = TransEModel(N_e, N_r, embedding_dim=16, entity_feature_dim=32)
|
|
405
|
+
scores = model.score_triples(triples, entity_features=kg.entity_features["visual"])
|
|
406
|
+
assert scores.shape == (N_t,)
|
|
407
|
+
scores.mean().backward()
|
|
@@ -323,7 +323,7 @@ class TestPackageBenchmarkSuite:
|
|
|
323
323
|
"data = run_v13_benchmark_suite(small=True, return_dict=True);"
|
|
324
324
|
"assert 'benchmarks' in data;"
|
|
325
325
|
"print('OK', len(data['benchmarks']))"],
|
|
326
|
-
capture_output=True, text=True,
|
|
326
|
+
capture_output=True, text=True,
|
|
327
327
|
cwd=str(tmp_path), # Run from an empty temp dir, not repo
|
|
328
328
|
)
|
|
329
329
|
assert result.returncode == 0, f"STDERR: {result.stderr[:300]}"
|
|
@@ -350,7 +350,7 @@ class TestPackageBenchmarkSuite:
|
|
|
350
350
|
result = subprocess.run(
|
|
351
351
|
[sys.executable, "-m", "tgraphx.benchmarks.run_v13_benchmark_suite",
|
|
352
352
|
"--small", "--out", str(out_file)],
|
|
353
|
-
capture_output=True, text=True,
|
|
353
|
+
capture_output=True, text=True,
|
|
354
354
|
cwd=str(tmp_path),
|
|
355
355
|
)
|
|
356
356
|
assert result.returncode == 0, f"STDERR: {result.stderr[:300]}"
|