-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
Related to #1927 --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/yaptide/ui/issues/1927?shareId=XXXX-XXXX-XXXX-XXXX).
…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`
Order of defined estimators in input files tab isn't preserved in Results tab as we can see on screenshots above. |
For Pages labels seems to work properly |
If we run from input files, then there is no way to preserve order of estimators, so that is indended. |
which backend version are you running (are you on recent master?) ? is it docker of local deployment ? |
src/services/ShSimulatorService.tsx
Outdated
const refsInResults = | ||
jobInputs?.input.inputJson && | ||
recreateRefsInResults(jobInputs.input.inputJson, estimator); | ||
// if editor project data (with filter definions etc) is available, recreate references in results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitions - typo
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:
recreateRefToScoringManagerOutputs
to rebuild references between estimators and their corresponding scoring manager outputs.recreateRefToFilters
function to rebuild references between estimators, their pages, and filters by linking filter UUIDs with actual filter objects.recreateRefsInResults
function to include detailed error handling and logging when input JSON or estimators are undefined.Improvements to
ShSimulation
component: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]Related to Results gets wrong label #1927
It seems the source of the bug is here:
26e4159#diff-2179512f339e13f570cb0371ad115ca927d2e7a48929797fd97671033ae6aa05R382-R390
it came with PR #1790 merged on 3.12.2024
For more details, open the Copilot Workspace session.