arrowspace 0.15.0__tar.gz → 0.21.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {arrowspace-0.15.0 → arrowspace-0.21.0}/Cargo.lock +57 -58
- {arrowspace-0.15.0 → arrowspace-0.21.0}/Cargo.toml +5 -4
- {arrowspace-0.15.0 → arrowspace-0.21.0}/PKG-INFO +3 -1
- {arrowspace-0.15.0 → arrowspace-0.21.0}/pyproject.toml +13 -0
- arrowspace-0.21.0/src/energyparams.rs +45 -0
- arrowspace-0.21.0/src/helpers.rs +60 -0
- arrowspace-0.21.0/src/lib.rs +363 -0
- arrowspace-0.21.0/tests/output/1760231695_v0_15/cve_comparison_metrics.csv +4 -0
- arrowspace-0.21.0/tests/output/1760231695_v0_15/cve_search_results.csv +91 -0
- arrowspace-0.21.0/tests/output/1760231695_v0_15/cve_summary.csv +7 -0
- arrowspace-0.21.0/tests/output/1760231695_v0_15/cve_tail_analysis.png +0 -0
- arrowspace-0.21.0/tests/output/1760231695_v0_15/cve_tail_metrics.csv +10 -0
- arrowspace-0.21.0/tests/output/1760231695_v0_15/cve_top10_comparison.png +0 -0
- arrowspace-0.21.0/tests/output/1760231695_v0_15/test_results.txt +256 -0
- arrowspace-0.21.0/tests/output/1760238942_v0_15/cve_tail_analysis.png +0 -0
- arrowspace-0.21.0/tests/output/1760238942_v0_15/cve_top10_comparison.png +0 -0
- arrowspace-0.21.0/tests/output/1760238942_v0_15/test_results.txt +248 -0
- arrowspace-0.21.0/tests/output/1760405824_v0_15_with_spec/cve_comparison_metrics.csv +4 -0
- arrowspace-0.21.0/tests/output/1760405824_v0_15_with_spec/cve_search_results.csv +91 -0
- arrowspace-0.21.0/tests/output/1760405824_v0_15_with_spec/cve_summary.csv +7 -0
- arrowspace-0.21.0/tests/output/1760405824_v0_15_with_spec/cve_tail_analysis.png +0 -0
- arrowspace-0.21.0/tests/output/1760405824_v0_15_with_spec/cve_tail_metrics.csv +10 -0
- arrowspace-0.21.0/tests/output/1760405824_v0_15_with_spec/cve_top10_comparison.png +0 -0
- arrowspace-0.21.0/tests/output/1760405824_v0_15_with_spec/test_results.txt +259 -0
- arrowspace-0.21.0/tests/output/1760485696_with_spec_new_data/cve_comparison_metrics.csv +4 -0
- arrowspace-0.21.0/tests/output/1760485696_with_spec_new_data/cve_search_results.csv +91 -0
- arrowspace-0.21.0/tests/output/1760485696_with_spec_new_data/cve_summary.csv +7 -0
- arrowspace-0.21.0/tests/output/1760485696_with_spec_new_data/cve_tail_analysis.png +0 -0
- arrowspace-0.21.0/tests/output/1760485696_with_spec_new_data/cve_tail_metrics.csv +10 -0
- arrowspace-0.21.0/tests/output/1760485696_with_spec_new_data/cve_top10_comparison.png +0 -0
- arrowspace-0.21.0/tests/output/1760485696_with_spec_new_data/test_results.txt +257 -0
- arrowspace-0.21.0/tests/output/1760626651_v0_15/cve_comparison_metrics.csv +4 -0
- arrowspace-0.21.0/tests/output/1760626651_v0_15/cve_search_results.csv +91 -0
- arrowspace-0.21.0/tests/output/1760626651_v0_15/cve_summary.csv +7 -0
- arrowspace-0.21.0/tests/output/1760626651_v0_15/cve_tail_analysis_v0_16.png +0 -0
- arrowspace-0.21.0/tests/output/1760626651_v0_15/cve_tail_metrics.csv +10 -0
- arrowspace-0.21.0/tests/output/1760626651_v0_15/cve_top10_comparison_v0_16.png +0 -0
- arrowspace-0.21.0/tests/output/1760626651_v0_15/test_results.txt +251 -0
- arrowspace-0.21.0/tests/output/1760705545_v0_16/cve_comparison_metrics.csv +4 -0
- arrowspace-0.21.0/tests/output/1760705545_v0_16/cve_search_results.csv +91 -0
- arrowspace-0.21.0/tests/output/1760705545_v0_16/cve_summary.csv +7 -0
- arrowspace-0.21.0/tests/output/1760705545_v0_16/cve_tail_analysis.png +0 -0
- arrowspace-0.21.0/tests/output/1760705545_v0_16/cve_tail_metrics.csv +10 -0
- arrowspace-0.21.0/tests/output/1760705545_v0_16/cve_top10_comparison.png +0 -0
- arrowspace-0.21.0/tests/output/1760705545_v0_16/test_results.txt +247 -0
- arrowspace-0.21.0/tests/output/1761047573_v0_17/cve_comparison_metrics.csv +4 -0
- arrowspace-0.21.0/tests/output/1761047573_v0_17/cve_search_results.csv +136 -0
- arrowspace-0.21.0/tests/output/1761047573_v0_17/cve_summary.csv +7 -0
- arrowspace-0.21.0/tests/output/1761047573_v0_17/cve_tail_analysis.png +0 -0
- arrowspace-0.21.0/tests/output/1761047573_v0_17/cve_tail_metrics.csv +10 -0
- arrowspace-0.21.0/tests/output/1761047573_v0_17/cve_top10_comparison.png +0 -0
- arrowspace-0.21.0/tests/output/1761047573_v0_17/test_results.txt +248 -0
- arrowspace-0.21.0/tests/output/1761063134_v0_17_beir-msmarco/beir_evaluation_results.json +23 -0
- arrowspace-0.21.0/tests/output/1761063134_v0_17_beir-msmarco/test_results.txt +131 -0
- arrowspace-0.21.0/tests/output/1761063804_v0_17_msmarco_tausweep/beir_tau_sweep_results.json +53 -0
- arrowspace-0.21.0/tests/output/1761063804_v0_17_msmarco_tausweep/test_results.txt +272 -0
- arrowspace-0.21.0/tests/output/1761065864_v0_17_msmarco_epssweep/beir_eps_sweep_results.json +71 -0
- arrowspace-0.21.0/tests/output/1761065864_v0_17_msmarco_epssweep/test_results.txt +305 -0
- arrowspace-0.21.0/tests/output/1761082320_v0_17_beir_new_score_6/test_results.txt +105 -0
- arrowspace-0.21.0/tests/output/1761082320_v0_17_beir_new_score_6/topology_aware_evaluation.json +170 -0
- arrowspace-0.21.0/tests/output/1761084560_v0_17_beir_new_score_6/test_results.txt +105 -0
- arrowspace-0.21.0/tests/output/1761084560_v0_17_beir_new_score_6/topology_aware_evaluation.json +197 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/improvement_heatmap.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/metrics_by_tau.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/per_query_comparison_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/per_query_comparison_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/per_query_comparison_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/per_query_improvements_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/per_query_improvements_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/per_query_improvements_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/radar_chart_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/radar_chart_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/radar_chart_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/score_distributions_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/score_distributions_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/score_distributions_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/summary_report.txt +57 -0
- arrowspace-0.21.0/tests/output/1761085598_v0_17_beir_new_score_7/topology_aware_tau_sweep.json +549 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/improvement_heatmap.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/metrics_by_tau.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/per_query_comparison_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/per_query_comparison_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/per_query_comparison_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/per_query_improvements_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/per_query_improvements_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/per_query_improvements_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/radar_chart_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/radar_chart_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/radar_chart_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/score_distributions_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/score_distributions_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/score_distributions_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/summary_report.txt +58 -0
- arrowspace-0.21.0/tests/output/1761087849_v0_17_beir_new_score_7/topology_aware_tau_sweep.json +549 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/improvement_heatmap.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/metrics_by_tau.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/per_query_comparison_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/per_query_comparison_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/per_query_comparison_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/per_query_improvements_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/per_query_improvements_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/per_query_improvements_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/radar_chart_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/radar_chart_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/radar_chart_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/score_distributions_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/score_distributions_tau_0.55.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/score_distributions_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/summary_report.txt +58 -0
- arrowspace-0.21.0/tests/output/1761090699_v0_17_beir_new_score_7/topology_aware_tau_sweep.json +549 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/improvement_heatmap.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/metrics_by_tau.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/per_query_comparison_tau_0.0.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/per_query_comparison_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/per_query_comparison_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/per_query_comparison_tau_0.8.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/per_query_improvements_tau_0.0.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/per_query_improvements_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/per_query_improvements_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/per_query_improvements_tau_0.8.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/radar_chart_tau_0.0.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/radar_chart_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/radar_chart_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/radar_chart_tau_0.8.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/score_distributions_tau_0.0.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/score_distributions_tau_0.42.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/score_distributions_tau_0.62.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/score_distributions_tau_0.8.png +0 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/summary_report.txt +71 -0
- arrowspace-0.21.0/tests/output/1761091843_v0_17_beir_new_score_7/topology_aware_tau_sweep.json +725 -0
- arrowspace-0.21.0/tests/output/1761234699_v0_18_energymaps_8_sweep/diffusion_sweep_heatmaps.png +0 -0
- arrowspace-0.21.0/tests/output/1761234699_v0_18_energymaps_8_sweep/diffusion_sweep_results.csv +17 -0
- arrowspace-0.21.0/tests/output/1761234699_v0_18_energymaps_8_sweep/test_results.txt +740 -0
- arrowspace-0.21.0/tests/output/1761239603_v0_18_energymaps_9_fixed/diffusion_sweep_heatmaps.png +0 -0
- arrowspace-0.21.0/tests/output/1761239603_v0_18_energymaps_9_fixed/diffusion_sweep_results.csv +2 -0
- arrowspace-0.21.0/tests/output/1761239603_v0_18_energymaps_9_fixed/test_results.txt +95 -0
- arrowspace-0.21.0/tests/output/1761390983_v0_18_1_energymaps_9_sweep/diffusion_sweep_heatmaps.png +0 -0
- arrowspace-0.21.0/tests/output/1761390983_v0_18_1_energymaps_9_sweep/diffusion_sweep_results.csv +11 -0
- arrowspace-0.21.0/tests/output/1761390983_v0_18_1_energymaps_9_sweep/test_results.txt +482 -0
- arrowspace-0.21.0/tests/output/1761485294_v0_18_4_energymaps_9_sweep/diffusion_sweep_heatmaps.png +0 -0
- arrowspace-0.21.0/tests/output/1761485294_v0_18_4_energymaps_9_sweep/diffusion_sweep_results.csv +21 -0
- arrowspace-0.21.0/tests/output/1761485294_v0_18_4_energymaps_9_sweep/test_results.txt +849 -0
- arrowspace-0.21.0/tests/output/1761566447_v0_20_1_energymaps_9_sweep_90k/diffusion_sweep_heatmaps.png +0 -0
- arrowspace-0.21.0/tests/output/1761566447_v0_20_1_energymaps_9_sweep_90k/diffusion_sweep_results.csv +21 -0
- arrowspace-0.21.0/tests/output/1761566447_v0_20_1_energymaps_9_sweep_90k/test_results.txt +702 -0
- arrowspace-0.21.0/tests/output/1761567896_v0_20_1_energymaps_9_sweep_300k/diffusion_sweep_heatmaps.png +0 -0
- arrowspace-0.21.0/tests/output/1761567896_v0_20_1_energymaps_9_sweep_300k/diffusion_sweep_results.csv +21 -0
- arrowspace-0.21.0/tests/output/1761567896_v0_20_1_energymaps_9_sweep_300k/test_results.txt +703 -0
- arrowspace-0.21.0/tests/output/1761567994_v0_21_0_energymaps_9_sweep_300k/diffusion_sweep_heatmaps.png +0 -0
- arrowspace-0.21.0/tests/output/1761567994_v0_21_0_energymaps_9_sweep_300k/diffusion_sweep_results.csv +13 -0
- arrowspace-0.21.0/tests/output/1761567994_v0_21_0_energymaps_9_sweep_300k/test_results.txt +439 -0
- arrowspace-0.21.0/tests/output/CVE-taumode_cosine_eps.csv +15 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/tests/requirements.txt +3 -1
- arrowspace-0.21.0/tests/test_2_CVE_db.py +700 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/tests/test_3_beir.py +189 -24
- arrowspace-0.21.0/tests/test_4_msmarco_tau_sweep.py +391 -0
- arrowspace-0.21.0/tests/test_5_msmarco_eps_sweep.py +423 -0
- arrowspace-0.21.0/tests/test_6_beir_new_score.py +577 -0
- arrowspace-0.21.0/tests/test_7_beir_new_score_sweep.py +878 -0
- arrowspace-0.21.0/tests/test_8_CVE_db_sweep.py +505 -0
- arrowspace-0.21.0/tests/test_9_CVE_db_fixed_eta.py +502 -0
- arrowspace-0.15.0/.gitignore +0 -76
- arrowspace-0.15.0/GRAPH_VARIABLES.md +0 -51
- arrowspace-0.15.0/NORMALISATION.md +0 -67
- arrowspace-0.15.0/README.md +0 -57
- arrowspace-0.15.0/TAUMODE.md +0 -58
- arrowspace-0.15.0/src/lib.rs +0 -326
- arrowspace-0.15.0/tests/svdecomposition.py +0 -48
- arrowspace-0.15.0/tests/test_2_CVE_db.py +0 -164
- {arrowspace-0.15.0 → arrowspace-0.21.0}/.github/workflows/CI.yml +0 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/.github/workflows/python-publish.yml +0 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/LICENSE +0 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/src/tests.rs +0 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/src/tests_python.rs +0 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/tests/__init__.py +0 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/tests/embeddings_model.py +0 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/tests/small_datasets/vectors_data_3000.txt +0 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/tests/test_0.py +0 -0
- {arrowspace-0.15.0 → arrowspace-0.21.0}/tests/test_1_quora_questions.py +0 -0
|
@@ -92,9 +92,9 @@ dependencies = [
|
|
|
92
92
|
|
|
93
93
|
[[package]]
|
|
94
94
|
name = "arrowspace"
|
|
95
|
-
version = "0.
|
|
95
|
+
version = "0.21.0"
|
|
96
96
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
97
|
-
checksum = "
|
|
97
|
+
checksum = "e9b48bd6b33d9a9387fdc7f73406fa7f02a6c22e99999f6e195688d398d0dbc3"
|
|
98
98
|
dependencies = [
|
|
99
99
|
"approx 0.5.1",
|
|
100
100
|
"dashmap",
|
|
@@ -105,6 +105,7 @@ dependencies = [
|
|
|
105
105
|
"rand_chacha",
|
|
106
106
|
"rand_distr",
|
|
107
107
|
"rayon",
|
|
108
|
+
"serde",
|
|
108
109
|
"smartcore",
|
|
109
110
|
"sprs",
|
|
110
111
|
]
|
|
@@ -219,6 +220,12 @@ version = "0.14.5"
|
|
|
219
220
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
220
221
|
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
|
221
222
|
|
|
223
|
+
[[package]]
|
|
224
|
+
name = "heck"
|
|
225
|
+
version = "0.5.0"
|
|
226
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
227
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
228
|
+
|
|
222
229
|
[[package]]
|
|
223
230
|
name = "hermit-abi"
|
|
224
231
|
version = "0.5.2"
|
|
@@ -227,9 +234,12 @@ checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
|
|
|
227
234
|
|
|
228
235
|
[[package]]
|
|
229
236
|
name = "indoc"
|
|
230
|
-
version = "
|
|
237
|
+
version = "2.0.7"
|
|
231
238
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
232
|
-
checksum = "
|
|
239
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
240
|
+
dependencies = [
|
|
241
|
+
"rustversion",
|
|
242
|
+
]
|
|
233
243
|
|
|
234
244
|
[[package]]
|
|
235
245
|
name = "is_terminal_polyfill"
|
|
@@ -258,7 +268,7 @@ checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4"
|
|
|
258
268
|
dependencies = [
|
|
259
269
|
"proc-macro2",
|
|
260
270
|
"quote",
|
|
261
|
-
"syn
|
|
271
|
+
"syn",
|
|
262
272
|
]
|
|
263
273
|
|
|
264
274
|
[[package]]
|
|
@@ -423,9 +433,9 @@ dependencies = [
|
|
|
423
433
|
|
|
424
434
|
[[package]]
|
|
425
435
|
name = "numpy"
|
|
426
|
-
version = "0.
|
|
436
|
+
version = "0.27.0"
|
|
427
437
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
428
|
-
checksum = "
|
|
438
|
+
checksum = "0fa24ffc88cf9d43f7269d6b6a0d0a00010924a8cc90604a21ef9c433b66998d"
|
|
429
439
|
dependencies = [
|
|
430
440
|
"libc",
|
|
431
441
|
"ndarray",
|
|
@@ -433,6 +443,7 @@ dependencies = [
|
|
|
433
443
|
"num-integer",
|
|
434
444
|
"num-traits",
|
|
435
445
|
"pyo3",
|
|
446
|
+
"pyo3-build-config",
|
|
436
447
|
"rustc-hash",
|
|
437
448
|
]
|
|
438
449
|
|
|
@@ -457,16 +468,6 @@ dependencies = [
|
|
|
457
468
|
"num-traits",
|
|
458
469
|
]
|
|
459
470
|
|
|
460
|
-
[[package]]
|
|
461
|
-
name = "parking_lot"
|
|
462
|
-
version = "0.12.4"
|
|
463
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
464
|
-
checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"
|
|
465
|
-
dependencies = [
|
|
466
|
-
"lock_api",
|
|
467
|
-
"parking_lot_core",
|
|
468
|
-
]
|
|
469
|
-
|
|
470
471
|
[[package]]
|
|
471
472
|
name = "parking_lot_core"
|
|
472
473
|
version = "0.9.11"
|
|
@@ -515,24 +516,25 @@ dependencies = [
|
|
|
515
516
|
|
|
516
517
|
[[package]]
|
|
517
518
|
name = "pyarrowspace"
|
|
518
|
-
version = "0.
|
|
519
|
+
version = "0.21.0"
|
|
519
520
|
dependencies = [
|
|
520
521
|
"arrowspace",
|
|
521
522
|
"numpy",
|
|
522
523
|
"pyo3",
|
|
524
|
+
"rayon",
|
|
523
525
|
]
|
|
524
526
|
|
|
525
527
|
[[package]]
|
|
526
528
|
name = "pyo3"
|
|
527
|
-
version = "0.
|
|
529
|
+
version = "0.27.1"
|
|
528
530
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
529
|
-
checksum = "
|
|
531
|
+
checksum = "37a6df7eab65fc7bee654a421404947e10a0f7085b6951bf2ea395f4659fb0cf"
|
|
530
532
|
dependencies = [
|
|
531
|
-
"cfg-if",
|
|
532
533
|
"indoc",
|
|
533
534
|
"libc",
|
|
534
535
|
"memoffset",
|
|
535
|
-
"
|
|
536
|
+
"once_cell",
|
|
537
|
+
"portable-atomic",
|
|
536
538
|
"pyo3-build-config",
|
|
537
539
|
"pyo3-ffi",
|
|
538
540
|
"pyo3-macros",
|
|
@@ -541,19 +543,18 @@ dependencies = [
|
|
|
541
543
|
|
|
542
544
|
[[package]]
|
|
543
545
|
name = "pyo3-build-config"
|
|
544
|
-
version = "0.
|
|
546
|
+
version = "0.27.1"
|
|
545
547
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
546
|
-
checksum = "
|
|
548
|
+
checksum = "f77d387774f6f6eec64a004eac0ed525aab7fa1966d94b42f743797b3e395afb"
|
|
547
549
|
dependencies = [
|
|
548
|
-
"once_cell",
|
|
549
550
|
"target-lexicon",
|
|
550
551
|
]
|
|
551
552
|
|
|
552
553
|
[[package]]
|
|
553
554
|
name = "pyo3-ffi"
|
|
554
|
-
version = "0.
|
|
555
|
+
version = "0.27.1"
|
|
555
556
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
556
|
-
checksum = "
|
|
557
|
+
checksum = "2dd13844a4242793e02df3e2ec093f540d948299a6a77ea9ce7afd8623f542be"
|
|
557
558
|
dependencies = [
|
|
558
559
|
"libc",
|
|
559
560
|
"pyo3-build-config",
|
|
@@ -561,25 +562,27 @@ dependencies = [
|
|
|
561
562
|
|
|
562
563
|
[[package]]
|
|
563
564
|
name = "pyo3-macros"
|
|
564
|
-
version = "0.
|
|
565
|
+
version = "0.27.1"
|
|
565
566
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
566
|
-
checksum = "
|
|
567
|
+
checksum = "eaf8f9f1108270b90d3676b8679586385430e5c0bb78bb5f043f95499c821a71"
|
|
567
568
|
dependencies = [
|
|
568
569
|
"proc-macro2",
|
|
569
570
|
"pyo3-macros-backend",
|
|
570
571
|
"quote",
|
|
571
|
-
"syn
|
|
572
|
+
"syn",
|
|
572
573
|
]
|
|
573
574
|
|
|
574
575
|
[[package]]
|
|
575
576
|
name = "pyo3-macros-backend"
|
|
576
|
-
version = "0.
|
|
577
|
+
version = "0.27.1"
|
|
577
578
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
578
|
-
checksum = "
|
|
579
|
+
checksum = "70a3b2274450ba5288bc9b8c1b69ff569d1d61189d4bff38f8d22e03d17f932b"
|
|
579
580
|
dependencies = [
|
|
581
|
+
"heck",
|
|
580
582
|
"proc-macro2",
|
|
583
|
+
"pyo3-build-config",
|
|
581
584
|
"quote",
|
|
582
|
-
"syn
|
|
585
|
+
"syn",
|
|
583
586
|
]
|
|
584
587
|
|
|
585
588
|
[[package]]
|
|
@@ -717,9 +720,15 @@ checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
|
|
|
717
720
|
|
|
718
721
|
[[package]]
|
|
719
722
|
name = "rustc-hash"
|
|
720
|
-
version = "1.1
|
|
723
|
+
version = "2.1.1"
|
|
721
724
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
722
|
-
checksum = "
|
|
725
|
+
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
|
|
726
|
+
|
|
727
|
+
[[package]]
|
|
728
|
+
name = "rustversion"
|
|
729
|
+
version = "1.0.22"
|
|
730
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
731
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
723
732
|
|
|
724
733
|
[[package]]
|
|
725
734
|
name = "scopeguard"
|
|
@@ -729,31 +738,32 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
|
729
738
|
|
|
730
739
|
[[package]]
|
|
731
740
|
name = "serde"
|
|
732
|
-
version = "1.0.
|
|
741
|
+
version = "1.0.228"
|
|
733
742
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
734
|
-
checksum = "
|
|
743
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
735
744
|
dependencies = [
|
|
736
745
|
"serde_core",
|
|
746
|
+
"serde_derive",
|
|
737
747
|
]
|
|
738
748
|
|
|
739
749
|
[[package]]
|
|
740
750
|
name = "serde_core"
|
|
741
|
-
version = "1.0.
|
|
751
|
+
version = "1.0.228"
|
|
742
752
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
743
|
-
checksum = "
|
|
753
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
744
754
|
dependencies = [
|
|
745
755
|
"serde_derive",
|
|
746
756
|
]
|
|
747
757
|
|
|
748
758
|
[[package]]
|
|
749
759
|
name = "serde_derive"
|
|
750
|
-
version = "1.0.
|
|
760
|
+
version = "1.0.228"
|
|
751
761
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
752
|
-
checksum = "
|
|
762
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
753
763
|
dependencies = [
|
|
754
764
|
"proc-macro2",
|
|
755
765
|
"quote",
|
|
756
|
-
"syn
|
|
766
|
+
"syn",
|
|
757
767
|
]
|
|
758
768
|
|
|
759
769
|
[[package]]
|
|
@@ -791,17 +801,6 @@ dependencies = [
|
|
|
791
801
|
"smallvec",
|
|
792
802
|
]
|
|
793
803
|
|
|
794
|
-
[[package]]
|
|
795
|
-
name = "syn"
|
|
796
|
-
version = "1.0.109"
|
|
797
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
798
|
-
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
|
799
|
-
dependencies = [
|
|
800
|
-
"proc-macro2",
|
|
801
|
-
"quote",
|
|
802
|
-
"unicode-ident",
|
|
803
|
-
]
|
|
804
|
-
|
|
805
804
|
[[package]]
|
|
806
805
|
name = "syn"
|
|
807
806
|
version = "2.0.106"
|
|
@@ -815,9 +814,9 @@ dependencies = [
|
|
|
815
814
|
|
|
816
815
|
[[package]]
|
|
817
816
|
name = "target-lexicon"
|
|
818
|
-
version = "0.
|
|
817
|
+
version = "0.13.3"
|
|
819
818
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
820
|
-
checksum = "
|
|
819
|
+
checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c"
|
|
821
820
|
|
|
822
821
|
[[package]]
|
|
823
822
|
name = "unicode-ident"
|
|
@@ -827,9 +826,9 @@ checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
|
|
|
827
826
|
|
|
828
827
|
[[package]]
|
|
829
828
|
name = "unindent"
|
|
830
|
-
version = "0.
|
|
829
|
+
version = "0.2.4"
|
|
831
830
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
832
|
-
checksum = "
|
|
831
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
833
832
|
|
|
834
833
|
[[package]]
|
|
835
834
|
name = "utf8parse"
|
|
@@ -1022,5 +1021,5 @@ checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
|
|
|
1022
1021
|
dependencies = [
|
|
1023
1022
|
"proc-macro2",
|
|
1024
1023
|
"quote",
|
|
1025
|
-
"syn
|
|
1024
|
+
"syn",
|
|
1026
1025
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "pyarrowspace"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.21.0"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
|
|
@@ -14,6 +14,7 @@ name = "arrowspace"
|
|
|
14
14
|
crate-type = ["cdylib"]
|
|
15
15
|
|
|
16
16
|
[dependencies]
|
|
17
|
-
arrowspace = "0.
|
|
18
|
-
pyo3 = { version = "
|
|
19
|
-
numpy = "0.
|
|
17
|
+
arrowspace = { version = "0.21.0" } # , path = "../arrowspace-rs"}
|
|
18
|
+
pyo3 = { version = "0.27.1", features = ["extension-module"] }
|
|
19
|
+
numpy = "0.27.0"
|
|
20
|
+
rayon = "1.8"
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arrowspace
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.21.0
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
7
7
|
License-File: LICENSE
|
|
8
8
|
Requires-Python: >=3.8
|
|
9
|
+
Project-URL: Homepage, https://github.com/tuned-org-uk/pyarrowspace
|
|
10
|
+
Project-URL: Repository, https://github.com/tuned-org-uk/pyarrowspace.git
|
|
@@ -11,5 +11,18 @@ classifiers = [
|
|
|
11
11
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
12
12
|
]
|
|
13
13
|
dynamic = ["version"]
|
|
14
|
+
|
|
15
|
+
[project.urls]
|
|
16
|
+
Homepage = "https://github.com/tuned-org-uk/pyarrowspace"
|
|
17
|
+
Repository = "https://github.com/tuned-org-uk/pyarrowspace.git"
|
|
18
|
+
|
|
14
19
|
[tool.maturin]
|
|
15
20
|
features = ["pyo3/extension-module"]
|
|
21
|
+
|
|
22
|
+
exclude = [
|
|
23
|
+
"tests/", # Exclude the entire 'tests' directory
|
|
24
|
+
".github/", # Exclude the 'docs' directory
|
|
25
|
+
"**/*.pyc", # Exclude all compiled Python files
|
|
26
|
+
"*.md",
|
|
27
|
+
".gitignore"
|
|
28
|
+
]
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
use ::arrowspace::energymaps::EnergyParams;
|
|
2
|
+
use pyo3::prelude::*;
|
|
3
|
+
use pyo3::types::PyDict;
|
|
4
|
+
|
|
5
|
+
pub fn parse_energy_params(dict_opt: Option<&Bound<'_, PyDict>>) -> PyResult<EnergyParams> {
|
|
6
|
+
let mut params = EnergyParams::default();
|
|
7
|
+
|
|
8
|
+
if let Some(d) = dict_opt {
|
|
9
|
+
if let Some(v) = d.get_item("optical_tokens")? {
|
|
10
|
+
params.optical_tokens = v.extract::<usize>().ok();
|
|
11
|
+
}
|
|
12
|
+
if let Some(v) = d.get_item("trim_quantile")? {
|
|
13
|
+
params.trim_quantile = v.extract().ok().unwrap_or(params.trim_quantile);
|
|
14
|
+
}
|
|
15
|
+
if let Some(v) = d.get_item("eta")? {
|
|
16
|
+
params.eta = v.extract().ok().unwrap_or(params.eta);
|
|
17
|
+
}
|
|
18
|
+
if let Some(v) = d.get_item("steps")? {
|
|
19
|
+
params.steps = v.extract().ok().unwrap_or(params.steps);
|
|
20
|
+
}
|
|
21
|
+
if let Some(v) = d.get_item("split_quantile")? {
|
|
22
|
+
params.split_quantile = v.extract().ok().unwrap_or(params.split_quantile);
|
|
23
|
+
}
|
|
24
|
+
if let Some(v) = d.get_item("neighbor_k")? {
|
|
25
|
+
params.neighbor_k = v.extract().ok().unwrap_or(params.neighbor_k);
|
|
26
|
+
}
|
|
27
|
+
if let Some(v) = d.get_item("split_tau")? {
|
|
28
|
+
params.split_tau = v.extract().ok().unwrap_or(params.split_tau);
|
|
29
|
+
}
|
|
30
|
+
if let Some(v) = d.get_item("w_lambda")? {
|
|
31
|
+
params.w_lambda = v.extract().ok().unwrap_or(params.w_lambda);
|
|
32
|
+
}
|
|
33
|
+
if let Some(v) = d.get_item("w_disp")? {
|
|
34
|
+
params.w_disp = v.extract().ok().unwrap_or(params.w_disp);
|
|
35
|
+
}
|
|
36
|
+
if let Some(v) = d.get_item("w_dirichlet")? {
|
|
37
|
+
params.w_dirichlet = v.extract().ok().unwrap_or(params.w_dirichlet);
|
|
38
|
+
}
|
|
39
|
+
if let Some(v) = d.get_item("candidate_m")? {
|
|
40
|
+
params.candidate_m = v.extract().ok().unwrap_or(params.candidate_m);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
Ok(params)
|
|
45
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
use pyo3::prelude::*;
|
|
2
|
+
use pyo3::types::PyDict;
|
|
3
|
+
use numpy::PyReadonlyArray2;
|
|
4
|
+
|
|
5
|
+
use std::sync::atomic::{AtomicBool, Ordering};
|
|
6
|
+
static DEBUG: AtomicBool = AtomicBool::new(false);
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
#[pyfunction]
|
|
10
|
+
pub fn set_debug(enabled: bool) {
|
|
11
|
+
DEBUG.store(enabled, Ordering::Relaxed);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
pub fn dbg_println(s: impl AsRef<str>) {
|
|
16
|
+
if cfg!(debug_assertions) {
|
|
17
|
+
println!("{}", s.as_ref());
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
pub fn parse_graph_params(dict_opt: Option<&Bound<'_, PyDict>>) -> PyResult<Option<(f64, usize, usize, f64, Option<f64>)>> {
|
|
22
|
+
let Some(d) = dict_opt else {
|
|
23
|
+
return Ok(None);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
let eps = d
|
|
27
|
+
.get_item("eps")?
|
|
28
|
+
.and_then(|v| v.extract::<f64>().ok())
|
|
29
|
+
.unwrap_or(0.2);
|
|
30
|
+
let k = d
|
|
31
|
+
.get_item("k")?
|
|
32
|
+
.and_then(|v| v.extract::<usize>().ok())
|
|
33
|
+
.unwrap_or(8);
|
|
34
|
+
let topk = d
|
|
35
|
+
.get_item("topk")?
|
|
36
|
+
.and_then(|v| v.extract::<usize>().ok())
|
|
37
|
+
.unwrap_or(3);
|
|
38
|
+
let p = d
|
|
39
|
+
.get_item("p")?
|
|
40
|
+
.and_then(|v| v.extract::<f64>().ok())
|
|
41
|
+
.unwrap_or(2.0);
|
|
42
|
+
let sigma = match d.get_item("sigma")? {
|
|
43
|
+
Some(v) => v.extract::<f64>().ok(),
|
|
44
|
+
None => None,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
Ok(Some((eps, k, topk, p, sigma)))
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
pub fn pyarray2_to_vecvec(arr: PyReadonlyArray2<f64>) -> PyResult<Vec<Vec<f64>>> {
|
|
51
|
+
let a = arr.as_array();
|
|
52
|
+
let (nrows, ncols) = (a.shape()[0], a.shape()[1]);
|
|
53
|
+
|
|
54
|
+
let mut rows = Vec::with_capacity(nrows);
|
|
55
|
+
for i in 0..nrows {
|
|
56
|
+
let row_view = a.row(i);
|
|
57
|
+
rows.push(row_view.to_vec());
|
|
58
|
+
}
|
|
59
|
+
Ok(rows)
|
|
60
|
+
}
|