Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix results label in simulation #1929

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

grzanka
Copy link
Contributor

@grzanka grzanka commented Jan 3, 2025

This pull request includes several updates to the src/services/ShSimulatorService.tsx file to improve the handling of references between estimators and their corresponding outputs and filters. The most important changes include the addition of new functions to rebuild these references and enhancements to error handling and logging.

Enhancements to reference handling:

  • Added detailed JSDoc comments and a new function recreateRefToScoringManagerOutputs to rebuild references between estimators and their corresponding scoring manager outputs.
  • Introduced the recreateRefToFilters function to rebuild references between estimators, their pages, and filters by linking filter UUIDs with actual filter objects.
  • Enhanced the recreateRefsInResults function to include detailed error handling and logging when input JSON or estimators are undefined.

Improvements to ShSimulation component:

  • Modified the ShSimulation component to conditionally recreate references in results based on the availability of editor project data, ensuring proper handling of user-uploaded files. [1] [2]
  • Removed unnecessary console logging for failed or canceled job statuses to clean up the code.
    Related to Results gets wrong label #1927

For more details, open the Copilot Workspace session.

@grzanka grzanka self-assigned this Jan 3, 2025
grzanka and others added 7 commits January 3, 2025 18:33
…r` and its `outputs` field

* Add console logs for `inputJsonForThisEstimator` and its `outputs` field
…ts` field

* **Recreate references functions**
  - Document `recreateRefsInResults`, `recreateRefToFilters`, and `recreateRefToScoringManagerOutputs` functions

* **Error message**
  - Fix typo in error message from "esitamtors" to "estimators"

* **Input JSON handling**
  - Make a copy of `jobInputs.input.inputJson` and assign it to `inputJsonForThisEstimator`
  - Ensure `inputJsonForThisEstimator` contains a field called `outputs`
  - Pass a single-element list as `outputs` to `recreateRefsInResults`
  - Dump `inputJsonForThisEstimator` to the console, particularly its `outputs` field
…ass filtered outputs

* Make a copy of `jobInputs.input.inputJson` and assign it to `inputJsonForThisEstimator`
* Ensure `inputJsonForThisEstimator` contains a field called `outputs`
* Pass a single-element list as `outputs` to `recreateRefsInResults`
* Update `data` object and `resolve` logic to handle the new `inputJsonForThisEstimator`
…gging

* Make a copy of `jobInputs.input.inputJson` and assign it to `inputJsonForThisEstimator`
* Ensure `inputJsonForThisEstimator` contains a field called `outputs`
* Pass a single-element list as `outputs` to `recreateRefsInResults`
* Add logging for `inputJsonForThisEstimator` in the console
* Add debugging logging to console in `recreateRefToScoringManagerOutputs`, `recreateRefToFilters`, and `recreateRefsInResults`
* Add comments explaining code logic in `recreateRefToScoringManagerOutputs`, `recreateRefToFilters`, and `recreateRefsInResults`
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.

1 participant