Skip to content

Commit

Permalink
Fix results label in simulation
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
grzanka committed Jan 3, 2025
1 parent e534ac2 commit 4845023
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions src/services/ShSimulatorService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,17 +410,30 @@ const ShSimulation = ({ children }: GenericContextProviderProps) => {

const jobInputs = await getJobInputs(info, signal, cache);

const refsInResults =
jobInputs?.input.inputJson &&
recreateRefsInResults(jobInputs.input.inputJson, estimator);
if (jobInputs?.input.inputJson) {
const inputJsonForThisEstimator = { ...jobInputs.input.inputJson };
inputJsonForThisEstimator.scoringManager.outputs = inputJsonForThisEstimator.scoringManager.outputs.filter(
output => output.name === estimatorName
);

const data: SpecificEstimator = {
jobId,
estimators: refsInResults ?? estimator,
message: response.message
};
const refsInResults = recreateRefsInResults(inputJsonForThisEstimator, estimator);

resolve(data);
const data: SpecificEstimator = {
jobId,
estimators: refsInResults ?? estimator,
message: response.message
};

resolve(data);
} else {
const data: SpecificEstimator = {
jobId,
estimators: estimator,
message: response.message
};

resolve(data);
}
},
cacheKey,
beforeCacheWrite
Expand Down

0 comments on commit 4845023

Please sign in to comment.