Skip to content

Commit

Permalink
[ML] Update allocations tooltip to clarify that it's per node (#197099)
Browse files Browse the repository at this point in the history
Clarifies text to mention nodes, conditional on being not-serverless
  • Loading branch information
leemthompo authored Oct 23, 2024
1 parent 629edc0 commit ea4ce57
Showing 1 changed file with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import type {
NodeDeploymentStatsResponse,
} from '../../../../common/types/trained_models';
import { useFieldFormatter } from '../../contexts/kibana/use_field_formatter';
import { useEnabledFeatures } from '../../contexts/ml';

interface AllocatedModelsProps {
models: NodeDeploymentStatsResponse['allocated_models'];
Expand All @@ -38,6 +39,7 @@ export const AllocatedModels: FC<AllocatedModelsProps> = ({
const dateFormatter = useFieldFormatter(FIELD_FORMAT_IDS.DATE);
const durationFormatter = useFieldFormatter(FIELD_FORMAT_IDS.DURATION);
const euiTheme = useEuiTheme();
const { showNodeInfo } = useEnabledFeatures();

const columns: Array<EuiBasicTableColumn<AllocatedModel>> = [
{
Expand Down Expand Up @@ -105,9 +107,20 @@ export const AllocatedModels: FC<AllocatedModelsProps> = ({
width: '8%',
name: (
<EuiToolTip
content={i18n.translate('xpack.ml.trainedModels.nodesList.modelsList.allocationTooltip', {
defaultMessage: 'number_of_allocations times threads_per_allocation',
})}
content={
showNodeInfo
? i18n.translate(
'xpack.ml.trainedModels.nodesList.modelsList.allocationTooltipNodes',
{
defaultMessage:
'Number of allocations per node multiplied by number of threads per allocation',
}
)
: i18n.translate('xpack.ml.trainedModels.nodesList.modelsList.allocationTooltip', {
defaultMessage:
'Number of allocations multiplied by number of threads per allocation',
})
}
>
<span>
{i18n.translate('xpack.ml.trainedModels.nodesList.modelsList.allocationHeader', {
Expand Down

0 comments on commit ea4ce57

Please sign in to comment.