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

Revert "Bias to incubation (#1449)" rebase, then reapply as a merge. #1495

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6943b1f
Re-enable Metrics
andrewballantyne Mar 16, 2023
8741023
Merge branch 'main' into f/mserving-metrics
andrewballantyne Mar 17, 2023
d9e950c
Fix Graphs & Configure Infrastructure (#1023)
andrewballantyne Mar 27, 2023
dfe7ecf
Merge branch 'main' into f/mserving-metrics
alexcreasy Apr 14, 2023
52f85f3
Trustyai demo phase0 (#1093)
alexcreasy Apr 25, 2023
cf074aa
Merge branch 'main' into f/mserving-metrics
alexcreasy Apr 27, 2023
1c2f158
Merge branch 'main' into rb
alexcreasy May 17, 2023
b7ad4c6
Merge branch 'main' into 'f/mserving-metrics'
alexcreasy May 18, 2023
7c4cc3e
TrustyAI Client (#1318)
alexcreasy Jun 1, 2023
dbf4cc0
Add model bias configuration table (#1290)
DaoDaoNoCode Jun 5, 2023
0e5df7e
Update Trusty AI client to handle API changes (#1336) (#1337)
alexcreasy Jun 5, 2023
4aa8675
Add bias metrics configuration modal (#1343)
DaoDaoNoCode Jun 8, 2023
694ada2
Multi-metric display on model bias screen (#1273) (#1349)
alexcreasy Jun 12, 2023
9f369a6
Fix metrics submission issue and handle errors (#1378)
DaoDaoNoCode Jun 14, 2023
e2f799d
Default and restrict threshold, add tooltips, default duplicate name …
DaoDaoNoCode Jun 16, 2023
7cd7cf2
Merge branch 'main' into f/mserving-metrics
alexcreasy Jun 19, 2023
3b82db3
Minor enhancements to bias chart (#1386) (#1399)
alexcreasy Jun 19, 2023
64a8012
Fixes issue with bias charts auto-refreshing with stale data (#1403) …
alexcreasy Jun 20, 2023
bdbb9f6
Add performance metrics feature flag and refactor runtime server rout…
DaoDaoNoCode Jun 23, 2023
1502831
Model serving metrics renaming (#1421)
DaoDaoNoCode Jun 23, 2023
ac6ab36
Adds support for TrustyAI Operator (#1443)
alexcreasy Jun 28, 2023
7fa6799
Merge remote-tracking branch 'opendatahub-io/main' into f/mserving-me…
DaoDaoNoCode Jun 28, 2023
df06394
Retrieve bias metrics from thanos querier (#1472) (#1473)
alexcreasy Jul 5, 2023
34c686d
Revert "Bias to incubation (#1449)"
alexcreasy Jul 10, 2023
ea5cad8
Merge branch 'f/mserving-metrics' into inc-revert2
alexcreasy Jul 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions backend/src/routes/api/prometheus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import {
OauthFastifyRequest,
PrometheusQueryRangeResponse,
PrometheusQueryResponse,
QueryType,
} from '../../../types';
import { callPrometheusPVC, callPrometheusServing } from '../../../utils/prometheusUtils';
import { callPrometheusThanos, callPrometheusServing } from '../../../utils/prometheusUtils';
import { createCustomError } from '../../../utils/requestUtils';
import { logRequestDetails } from '../../../utils/fileUtils';

Expand Down Expand Up @@ -35,7 +36,22 @@ module.exports = async (fastify: KubeFastifyInstance) => {
): Promise<{ code: number; response: PrometheusQueryResponse }> => {
const { query } = request.body;

return callPrometheusPVC(fastify, request, query).catch(handleError);
return callPrometheusThanos(fastify, request, query).catch(handleError);
},
);

fastify.post(
'/bias',
async (
request: OauthFastifyRequest<{
Body: { query: string };
}>,
): Promise<{ code: number; response: PrometheusQueryResponse }> => {
const { query } = request.body;

return callPrometheusThanos(fastify, request, query, QueryType.QUERY_RANGE).catch(
handleError,
);
},
);

Expand Down
5 changes: 3 additions & 2 deletions backend/src/utils/prometheusUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,18 @@ const generatePrometheusHostURL = (
return `https://${instanceName}.${namespace}.svc.cluster.local:${port}`;
};

export const callPrometheusPVC = (
export const callPrometheusThanos = (
fastify: KubeFastifyInstance,
request: OauthFastifyRequest,
query: string,
queryType: QueryType = QueryType.QUERY,
): Promise<{ code: number; response: PrometheusQueryResponse }> =>
callPrometheus(
fastify,
request,
query,
generatePrometheusHostURL(fastify, 'thanos-querier', 'openshift-monitoring', '9092'),
QueryType.QUERY,
queryType,
);

export const callPrometheusServing = (
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/api/prometheus/serving.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const useModelServingMetrics = (
end,
timeframe,
trustyResponsePredicate,
'/api/prometheus/bias',
);

const modelTrustyAIDIR = useQueryRangeResourceData(
Expand All @@ -109,6 +110,7 @@ export const useModelServingMetrics = (
end,
timeframe,
trustyResponsePredicate,
'/api/prometheus/bias',
);

React.useEffect(() => {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/api/prometheus/useQueryRangeResourceData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ const useQueryRangeResourceData = <T = PrometheusQueryRangeResultValue>(
end: number,
timeframe: TimeframeTitle,
responsePredicate: ResponsePredicate<T>,
apiPath = '/api/prometheus/serving',
): ContextResourceData<T> =>
useRestructureContextResourceData<T>(
usePrometheusQueryRange<T>(
active,
'/api/prometheus/serving',
apiPath,
query,
TimeframeTimeRange[timeframe],
end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ const PipelineRunJobTable: React.FC<PipelineRunTableProps> = ({ jobs, experiment
)}
/>
)}

<DeletePipelineCoreResourceModal
toDeleteResources={deleteResources}
type="scheduled run"
Expand Down
Loading