Skip to content

Commit

Permalink
[fasttrackml][aim] Rename Trace Last Value to Values and Turn Off Adv…
Browse files Browse the repository at this point in the history
…anced Mode for Queries from Search Form
  • Loading branch information
cody-yancey authored and vinayan3 committed Sep 11, 2024
1 parent 9ef9cb7 commit d460202
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/src/services/models/explorer/metricsModelMethods.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import moment from 'moment';
import { saveAs } from 'file-saver';
import _ from 'lodash-es';
import { config } from 'yargs';

import { IAxesScaleRange } from 'components/AxesPropsPopover';

Expand Down Expand Up @@ -303,6 +304,7 @@ function getMetricsAppModelMethods(

if (queryString) {
configData.select.query = queryString;
configData.select.advancedMode = false;
}

let metrics = getMetricsListFromSelect(configData?.select);
Expand Down
2 changes: 1 addition & 1 deletion src/src/services/models/explorer/paramsModelMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ function getParamsModelMethods(
const metricHash = getMetricHash(trace.name, trace.context);
// TODO: Implement Support for the new metric value API format
// metricsRowValues[metricHash] = formatValue(trace.values.last);
metricsRowValues[metricHash] = formatValue(trace.last_value.last);
metricsRowValues[metricHash] = formatValue(trace.values.last);
});
const rowValues: any = {
rowMeta: {
Expand Down
2 changes: 1 addition & 1 deletion src/src/services/models/explorer/runsModelMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ function getRunsModelMethods(
const metricHash = getMetricHash(trace.name, trace.context);
// TODO: Implement Support for the new metric value API format
metricsRowValues[metricHash] = formatValue(
trace.last_value.last,
trace.values.last,
// trace.values[metricsValueKey],
);
});
Expand Down
6 changes: 3 additions & 3 deletions src/src/services/models/explorer/scattersModelMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ function getScattersModelMethods(
_.isEqual(trace.context, value?.context)
) {
// TODO: Revert this back to trace.values.last;
let lastValue = trace.last_value.last;
let lastValue = trace.values.last;
const formattedLastValue = formatValue(lastValue, '-');
values[i] = lastValue;
if (formattedLastValue !== '-') {
Expand Down Expand Up @@ -565,7 +565,7 @@ function getScattersModelMethods(
metric.run.traces.metric.forEach((trace: any) => {
const metricHash = getMetricHash(trace.name, trace.context as any);
// TODO: Implement Support for the new metric value API format
metricsRowValues[metricHash] = formatValue(trace.last_value.last);
metricsRowValues[metricHash] = formatValue(trace.values.last);
//metricsRowValues[metricHash] = formatValue(trace.values.last);
});
const rowValues: any = {
Expand Down Expand Up @@ -765,7 +765,7 @@ function getScattersModelMethods(
metricsValues[metricHash] = {
min: '-',
max: '-',
last: traceOldAPI.last_value.last,
last: traceOldAPI.values.last,
first: '-',
};
});
Expand Down

0 comments on commit d460202

Please sign in to comment.