Skip to content

EOT evaluation with test#1433

Open
FlorianPfaff wants to merge 4 commits intomainfrom
eotnew202512
Open

EOT evaluation with test#1433
FlorianPfaff wants to merge 4 commits intomainfrom
eotnew202512

Conversation

@FlorianPfaff
Copy link
Copy Markdown
Owner

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 4, 2025

MegaLinter analysis: Error

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 10.41s
✅ JSON prettier 2 0 0 0 0.5s
✅ JSON v8r 2 0 0 2.77s
✅ MARKDOWN markdownlint 1 0 0 0 0.65s
✅ MARKDOWN markdown-table-formatter 1 0 0 0 0.23s
✅ PYTHON bandit 289 0 0 4.11s
✅ PYTHON black 289 12 0 0 6.0s
✅ PYTHON flake8 289 0 0 2.19s
✅ PYTHON isort 289 16 0 0 0.6s
✅ PYTHON mypy 289 0 0 4.81s
❌ PYTHON pylint 289 1 0 97.72s
✅ PYTHON ruff 289 16 0 0 0.06s
✅ REPOSITORY checkov yes no no 25.1s
✅ REPOSITORY gitleaks yes no no 6.95s
✅ REPOSITORY git_diff yes no no 0.05s
✅ REPOSITORY secretlint yes no no 6.99s
✅ REPOSITORY syft yes no no 3.85s
✅ REPOSITORY trivy-sbom yes no no 1.78s
✅ REPOSITORY trufflehog yes no no 19.96s
✅ YAML prettier 4 1 0 0 0.48s
✅ YAML v8r 4 0 0 5.45s
✅ YAML yamllint 4 0 0 0.46s

Detailed Issues

❌ PYTHON / pylint - 1 error
************* Module pyrecest.tests.test_evaluation_eot
pyrecest/tests/test_evaluation_eot.py:8:4: E1101: Module 'pyrecest' has no 'backend' member (no-member)

------------------------------------
Your code has been rated at 10.00/10

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 Dec 4, 2025

Test Results

    12 files  ± 0     12 suites  ±0   4h 36m 15s ⏱️ + 7m 5s
   986 tests + 1    986 ✅ +1      0 💤 ±0  0 ❌ ±0 
12 116 runs  +12  9 376 ✅ +4  2 740 💤 +8  0 ❌ ±0 

Results for commit 7e756db. ± Comparison against base commit 4dbfd43.

♻️ This comment has been updated with latest results.

@FlorianPfaff FlorianPfaff force-pushed the eotnew202512 branch 2 times, most recently from e7dddb3 to f416e2c Compare April 15, 2026 12:40
@FlorianPfaff
Copy link
Copy Markdown
Owner Author

@copilot Can you fix this?

=================================== FAILURES ===================================
_____ TestEvalationEOT.test_evaluate_for_simulation_config_R2_random_walk ______
pyrecest/tests/test_evaluation_basic.py:50: in setUp
simulation_config = simulation_database(self.scenario_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


scenario_name = 'R2randomWalkEOT', scenario_customization_params = None

@beartype
def simulation_database(
    scenario_name: str = "custom", scenario_customization_params: Optional[dict] = None
) -> dict:
    simulation_param: dict = {
        "n_timesteps": None,
        "all_seeds": None,
        "eot": False,
        "mtt": False,
        "n_targets": 1,
    }

    if scenario_name == "custom":
        warnings.warn(
            "Scenario not recognized. Assuming scenario_customization_params contains all parameters."
        )
        assert scenario_customization_params is not None
        simulation_param.update(scenario_customization_params)
    elif scenario_name == "R2randomWalk":
        simulation_param["manifold"] = "Euclidean"
        simulation_param["n_timesteps"] = 10
        simulation_param["initial_prior"] = GaussianDistribution(zeros(2), 0.5 * eye(2))
        simulation_param["meas_noise"] = GaussianDistribution(zeros(2), 0.5 * eye(2))
        simulation_param["sys_noise"] = GaussianDistribution(zeros(2), 0.5 * eye(2))
        simulation_param["gen_next_state_without_noise_is_vectorized"] = True
    else:
      raise ValueError("Scenario not recognized.")

E ValueError: Scenario not recognized.

pyrecest/evaluation/simulation_database.py:37: ValueError
=============================== warnings summary ===============================
pyrecest/tests/distributions/test_hypertoroidal_grid_distribution.py::HypertoroidalGridDistributionTest::test_get_grid
pyrecest/tests/distributions/test_td_cond_td_grid_distribution.py::TdCondTdGridDistributionTest::test_fix_dim_returns_hgd
pyrecest/tests/distributions/test_td_cond_td_grid_distribution.py::TdCondTdGridDistributionTest::test_from_function_fix_dim_roundtrip
pyrecest/tests/distributions/test_td_cond_td_grid_distribution.py::TdCondTdGridDistributionTest::test_marginalize_out_returns_hgd
pyrecest/tests/distributions/test_td_cond_td_grid_distribution.py::TdCondTdGridDistributionTest::test_marginalize_out_sums
/home/runner/work/PyRecEst/PyRecEst/pyrecest/distributions/abstract_grid_distribution.py:87: UserWarning: Warning: Grid values apparently do not belong to a normalized density. Normalizing...
warnings.warn(

pyrecest/tests/distributions/test_s2_cond_s2_grid_distribution.py::TestS2CondS2GridDistributionFromFunction::test_equal_with_and_without_cart
/home/runner/work/PyRecEst/PyRecEst/pyrecest/distributions/conditional/sd_cond_sd_grid_distribution.py:76: UserWarning: Normalization:notNormalized: When conditioning values for the first sphere on the second, normalisation is not ensured. Check input or increase tolerance. No normalisation is performed; you may want to do this manually.
warnings.warn(

pyrecest/tests/distributions/test_td_cond_td_grid_distribution.py::TdCondTdGridDistributionTest::test_from_function_cartesian_product_flag
pyrecest/tests/distributions/test_td_cond_td_grid_distribution.py::TdCondTdGridDistributionTest::test_from_function_fix_dim_roundtrip
pyrecest/tests/distributions/test_td_cond_td_grid_distribution.py::TdCondTdGridDistributionTest::test_from_function_t1
/home/runner/work/PyRecEst/PyRecEst/pyrecest/distributions/conditional/td_cond_td_grid_distribution.py:66: UserWarning: Normalization:notNormalized: When conditioning values for the first torus on the second, normalisation is not ensured. Check input or increase tolerance. No normalisation is performed; you may want to do this manually.
warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

  • generated xml file: /home/runner/work/PyRecEst/PyRecEst/junit_test_results_numpy.xml -
    =========================== short test summary info ============================
    FAILED pyrecest/tests/test_evaluation_eot.py::TestEvalationEOT::test_evaluate_for_simulation_config_R2_random_walk - ValueError: Scenario not recognized.
    == 1 failed, 740 passed, 9 warnings, 44 subtests passed in 442.38s (0:07:22) ===

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 18, 2026

@copilot Can you fix this?

=================================== FAILURES ===================================
...

Fixed in commit 617df00. The changes add the missing R2randomWalkEOT scenario to simulation_database.py and wire up the EOT evaluation pipeline:

  1. simulation_database.py: Added R2randomWalkEOT scenario with the required EOT parameters (target shape, sampling style, measurement counts, filter parameters).
  2. configure_for_filter.py: Added random_matrix filter case that initializes a RandomMatrixTracker from the scenario config.
  3. perform_predict_update_cycles.py: Added EOT-specific update path that passes all measurements at once to tracker.update().
  4. abstract_extended_object_tracker.py: Added filter_state property returning self so the tracker integrates with the evaluation pipeline.
  5. generate_measurements.py: Fixed a bug where the PolygonWithSampling class check was applied to the original shape instead of the translated curr_shape (shapely's translate always returns a plain Polygon).

@FlorianPfaff
Copy link
Copy Markdown
Owner Author

@copilot Suppress the too-many warnings and solve the rest

************* Module pyrecest.evaluation.configure_for_filter
pyrecest/evaluation/configure_for_filter.py:11:0: R0914: Too many local variables (17/15) (too-many-locals)
************* Module pyrecest.tests.test_evaluation_eot
pyrecest/tests/test_evaluation_eot.py:15:12: W0612: Unused variable 'last_filter_states' (unused-variable)
pyrecest/tests/test_evaluation_eot.py:16:12: W0612: Unused variable 'runtimes' (unused-variable)
pyrecest/tests/test_evaluation_eot.py:17:12: W0612: Unused variable 'run_failed' (unused-variable)
pyrecest/tests/test_evaluation_eot.py:18:12: W0612: Unused variable 'groundtruths' (unused-variable)
pyrecest/tests/test_evaluation_eot.py:19:12: W0612: Unused variable 'measurements' (unused-variable)
pyrecest/tests/test_evaluation_eot.py:20:12: W0612: Unused variable 'scenario_config' (unused-variable)
pyrecest/tests/test_evaluation_eot.py:21:12: W0612: Unused variable 'filter_configs' (unused-variable)
pyrecest/tests/test_evaluation_eot.py:22:12: W0612: Unused variable 'evaluation_config' (unused-variable)
************* Module update_init_helper
update_init_helper.py:1:0: R0801: Similar lines in 2 files
==pyrecest.tests.test_evaluation_basic:[443:463]
==pyrecest.tests.test_evaluation_eot:[11:31]
]

    (
        last_filter_states,  # pylint: disable=R0801
        runtimes,  # pylint: disable=R0801
        run_failed,  # pylint: disable=R0801
        groundtruths,  # pylint: disable=R0801
        measurements,  # pylint: disable=R0801
        scenario_config,  # pylint: disable=R0801
        filter_configs,  # pylint: disable=R0801
        evaluation_config,  # pylint: disable=R0801
    ) = evaluate_for_simulation_config(
        self.scenario_name,
        filters_configs_input,
        n_runs=self.n_runs_default,
        n_timesteps=self.n_timesteps_default,
        initial_seed=1,
        auto_warning_on_off=False,
        save_folder=self.tmpdirname.name,
    ) (duplicate-code)

Your code has been rated at 9.99/10

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 18, 2026

@copilot Suppress the too-many warnings and solve the rest

************* Module pyrecest.evaluation.configure_for_filter
...

Fixed in commit d6c6232:

  • Added # pylint: disable=too-many-locals to configure_for_filter.py
  • Simplified test_evaluation_eot.py to call evaluate_for_simulation_config without capturing the return values (all 8 unused-variable warnings resolved)

@FlorianPfaff FlorianPfaff force-pushed the main branch 2 times, most recently from a4109db to 4dbfd43 Compare April 21, 2026 11:57
@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