Skip to content

Add ability to use external cost mat for GNN#1741

Open
FlorianPfaff wants to merge 6 commits intomainfrom
externalcostmat
Open

Add ability to use external cost mat for GNN#1741
FlorianPfaff wants to merge 6 commits intomainfrom
externalcostmat

Conversation

@FlorianPfaff
Copy link
Copy Markdown
Owner

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 19, 2026

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 10.23s
✅ JSON prettier 2 0 0 0 0.39s
✅ JSON v8r 2 0 0 2.7s
✅ MARKDOWN markdownlint 1 0 0 0 0.64s
✅ MARKDOWN markdown-table-formatter 1 0 0 0 0.24s
✅ PYTHON bandit 337 0 0 4.78s
✅ PYTHON black 337 5 0 0 7.02s
✅ PYTHON flake8 337 0 0 2.53s
✅ PYTHON isort 337 9 0 0 0.65s
✅ PYTHON mypy 337 0 0 4.64s
✅ PYTHON pylint 337 0 0 101.92s
✅ PYTHON ruff 337 9 0 0 0.06s
✅ REPOSITORY checkov yes no no 22.7s
✅ REPOSITORY gitleaks yes no no 6.91s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY secretlint yes no no 7.32s
✅ REPOSITORY syft yes no no 2.85s
✅ REPOSITORY trivy-sbom yes no no 2.04s
✅ REPOSITORY trufflehog yes no no 19.26s
✅ YAML prettier 4 0 0 0 0.48s
✅ YAML v8r 4 0 0 4.47s
✅ YAML yamllint 4 0 0 0.41s

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.4.0 --custom-flavor-setup --custom-flavor-linters PYTHON_PYLINT,PYTHON_BLACK,PYTHON_FLAKE8,PYTHON_ISORT,PYTHON_BANDIT,PYTHON_MYPY,PYTHON_RUFF,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 19, 2026

Test Results

    12 files  ± 0     12 suites  ±0   4h 37m 43s ⏱️ + 19m 20s
   987 tests + 2    987 ✅ +2      0 💤 ± 0  0 ❌ ±0 
12 128 runs  +24  9 380 ✅ +8  2 748 💤 +16  0 ❌ ±0 

Results for commit 32ad962. ± Comparison against base commit 224177b.

♻️ This comment has been updated with latest results.

@FlorianPfaff
Copy link
Copy Markdown
Owner Author

@copilot Do not use numpy, import from pyrecest.backend instead (see other fiels).

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 19, 2026

@copilot Do not use numpy, import from pyrecest.backend instead (see other fiels).

Fixed in commit 0b0e3eb. Replaced import numpy as _np in global_nearest_neighbor.py with asarray, isfinite, where, and any from pyrecest.backend. Also removed import numpy as np from the test file, replacing np.inf with float("inf").

@FlorianPfaff
Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

@copilot resolve the merge conflicts in this pull request

Resolved in commit 84c4cb9. Merged origin/main into the branch — the only conflict was in global_nearest_neighbor.py, which I resolved by adopting main's additive pairwise_cost_weight approach while keeping warnings.warn instead of print and adding any to the backend imports. The test file was also updated to use the pairwise_cost_matrix parameter name that matches main's interface. All 14 tests pass.

@FlorianPfaff
Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

@copilot resolve the merge conflicts in this pull request

Resolved in commit 650b94f. Merged origin/main — the only conflict in global_nearest_neighbor.py was resolved by keeping any in the backend imports and warnings.warn instead of print. All 14 tests pass.

@FlorianPfaff
Copy link
Copy Markdown
Owner Author

@copilot Use skipif to skip these tests for unsupported backends.

=========================== short test summary info ============================
FAILED pyrecest/tests/filters/test_gnn_cost_matrix_interface.py::test_update_linear_accepts_precomputed_cost_matrix_and_overrides_geometry - AssertionError: Only supported for numpy backend
FAILED pyrecest/tests/filters/test_gnn_cost_matrix_interface.py::test_update_linear_skips_dummy_assignment_from_precomputed_cost_matrix - AssertionError: Only supported for numpy backend
= 2 failed, 477 passed, 502 skipped, 29 warnings, 9 subtests passed in 1058.53s (0:17:38) =

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

@copilot Use skipif to skip these tests for unsupported backends.

=========================== short test summary info ============================
...

Fixed in commit 76b154e. Converted the two standalone test functions into a unittest.TestCase class decorated with @unittest.skipIf(pyrecest.backend.__backend_name__ != "numpy", reason="Only supported on numpy backend"), following the same pattern used in test_joint_probabilistic_data_association_filter.py and other test files.

@FlorianPfaff
Copy link
Copy Markdown
Owner Author

@copilot Fix this:

************* Module pyrecest.filters.global_nearest_neighbor
pyrecest/filters/global_nearest_neighbor.py:216:4: W0237: Parameter 'association_cost_matrix' has been renamed to 'pairwise_cost_matrix' in overriding 'GlobalNearestNeighbor.update_linear' method (arguments-renamed)


Your code has been rated at 10.00/10

…to fix W0237

Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/baf0fba0-64aa-49dc-8ce3-63af8d2921a6

Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

@copilot Fix this:

************* Module pyrecest.filters.global_nearest_neighbor
...

Fixed in commit 32ad962. Renamed association_cost_matrix to pairwise_cost_matrix in AbstractNearestNeighborTracker.update_linear so the base class parameter name matches the overriding method. Pylint now scores 10.00/10 with no arguments-renamed warning.

@FlorianPfaff FlorianPfaff force-pushed the main branch 2 times, most recently from 7b21428 to 429a157 Compare April 21, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants