-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ML] DF Regression: fix custom results_field and prediction_field_name not considered in eval config #48599
[ML] DF Regression: fix custom results_field and prediction_field_name not considered in eval config #48599
Changes from 3 commits
147c392
4a788f2
695aaed
df6b171
46608b1
bdadabd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,13 @@ import { DataFrameAnalyticsListRow } from './common'; | |
import { ExpandedRowDetailsPane, SectionConfig } from './expanded_row_details_pane'; | ||
import { ExpandedRowJsonPane } from './expanded_row_json_pane'; | ||
import { ProgressBar } from './progress_bar'; | ||
import { getDependentVar, getValuesFromResponse, loadEvalData, Eval } from '../../../../common'; | ||
import { | ||
getDependentVar, | ||
getPredictionFieldName, | ||
getValuesFromResponse, | ||
loadEvalData, | ||
Eval, | ||
} from '../../../../common'; | ||
import { isCompletedAnalyticsJob } from './common'; | ||
import { isRegressionAnalysis } from '../../../../common/analytics'; | ||
// import { ExpandedRowMessagesPane } from './expanded_row_messages_pane'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. commented import (not part of the changes, but should be removed I guess) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this was added in the original code for when the messages become available - which I think they are now if not very soon. I think it's worth keeping in as it will be used very soon. 😄 |
||
|
@@ -60,6 +66,9 @@ export const ExpandedRow: FC<Props> = ({ item }) => { | |
const [isLoadingGeneralization, setIsLoadingGeneralization] = useState<boolean>(false); | ||
const index = idx(item, _ => _.config.dest.index) as string; | ||
const dependentVariable = getDependentVar(item.config.analysis); | ||
const predictionFieldName = getPredictionFieldName(item.config.analysis); | ||
// default is 'ml' | ||
const resultsField = item.config.dest.results_field; | ||
const jobIsCompleted = isCompletedAnalyticsJob(item.stats); | ||
const isRegressionJob = isRegressionAnalysis(item.config.analysis); | ||
|
||
|
@@ -71,6 +80,8 @@ export const ExpandedRow: FC<Props> = ({ item }) => { | |
isTraining: false, | ||
index, | ||
dependentVariable, | ||
resultsField, | ||
predictionFieldName, | ||
}); | ||
|
||
if (genErrorEval.success === true && genErrorEval.eval) { | ||
|
@@ -94,6 +105,8 @@ export const ExpandedRow: FC<Props> = ({ item }) => { | |
isTraining: true, | ||
index, | ||
dependentVariable, | ||
resultsField, | ||
predictionFieldName, | ||
}); | ||
|
||
if (trainingErrorEval.success === true && trainingErrorEval.eval) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When testing this I noticed that it is possible to create a job without entering the
prediction_field_name
. The Create button should be disabled unless they have entered aprediction_field_name
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
prediction_field_name
is optional (defaults to whatever<dependent_variable>_prediction
) - do you mean thedependent_variable
? If so that was fixed in this commit : df6b171