Skip to content

Commit

Permalink
Clarify no documents error message when filtering by is_training (#75227
Browse files Browse the repository at this point in the history
)
  • Loading branch information
alvarezmelissa87 authored Aug 18, 2020
1 parent e04e05a commit 2a212cb
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,16 @@ export const EvaluatePanel: FC<Props> = ({ jobConfig, jobStatus, searchQuery })
{generalizationEval.error !== null && (
<EuiFlexItem grow={false}>
<EuiText size="xs" color="danger">
{generalizationEval.error}
{isTrainingFilter === true &&
generalizationDocsCount === 0 &&
generalizationEval.error.includes('No documents found')
? i18n.translate(
'xpack.ml.dataframe.analytics.regressionExploration.evaluateNoTestingDocsError',
{
defaultMessage: 'No testing documents found',
}
)
: generalizationEval.error}
</EuiText>
</EuiFlexItem>
)}
Expand Down Expand Up @@ -421,7 +430,16 @@ export const EvaluatePanel: FC<Props> = ({ jobConfig, jobStatus, searchQuery })
{trainingEval.error !== null && (
<EuiFlexItem grow={false}>
<EuiText size="xs" color="danger">
{trainingEval.error}
{isTrainingFilter === false &&
trainingDocsCount === 0 &&
trainingEval.error.includes('No documents found')
? i18n.translate(
'xpack.ml.dataframe.analytics.regressionExploration.evaluateNoTrainingDocsError',
{
defaultMessage: 'No training documents found',
}
)
: trainingEval.error}
</EuiText>
</EuiFlexItem>
)}
Expand Down

0 comments on commit 2a212cb

Please sign in to comment.