Failed to train : : 'NoneType' object is not iterable

Options
curiousGeorge
curiousGeorge Registered Posts: 1
edited July 16 in Using Dataiku
com.dataiku.dip.io.SocketBlockLinkKernelException: Failed to train : <class 'TypeError'> : 'NoneType' object is not iterable
    at com.dataiku.dip.io.SocketBlockLinkInteraction.throwExceptionFromPython(SocketBlockLinkInteraction.java:302)
    at com.dataiku.dip.io.SocketBlockLinkInteraction$AsyncResult.checkException(SocketBlockLinkInteraction.java:215)
    at com.dataiku.dip.io.SocketBlockLinkInteraction$AsyncResult.get(SocketBlockLinkInteraction.java:190)
    at com.dataiku.dip.io.SingleCommandKernelLink$1.call(SingleCommandKernelLink.java:211)
    at com.dataiku.dip.analysis.ml.prediction.PredictionTrainAdditionalThread.process(PredictionTrainAdditionalThread.java:76)
    at com.dataiku.dip.analysis.ml.shared.PRNSTrainThread.run(PRNSTrainThread.java:170)
FIT/PROCESS WITH Step:FeatureSelectionStep
/opt/dataiku-dss-12.1.3/python39.packages/sklearn/feature_selection/_univariate_selection.py:112: UserWarning: Features [0 0] are constant.
  warnings.warn("Features %s are constant." % constant_features_idx, UserWarning)
/opt/dataiku-dss-12.1.3/python39.packages/sklearn/feature_selection/_univariate_selection.py:113: RuntimeWarning: invalid value encountered in true_divide
  f = msb / msw
/opt/dataiku-dss-12.1.3/python39.packages/sklearn/feature_selection/_univariate_selection.py:112: UserWarning: Features [0] are constant.
  warnings.warn("Features %s are constant." % constant_features_idx, UserWarning)
[2023-10-20 17:05:30,565] [125197/MainThread] [INFO] [dataiku.doctor.utils.listener] END -  Preprocessing train set
[2023/10/20-17:05:30.566] [MRT-16096] [INFO] [dku.block.link.interaction]  - Check result for nullity exceptionIfNull=true result=null
Traceback (most recent call last):
  File "/opt/dataiku-dss-12.1.3/python/dataiku/doctor/server.py", line 45, in serve
    ret = api_command(arg)
  File "/opt/dataiku-dss-12.1.3/python/dataiku/doctor/dkuapi.py", line 45, in aux
    return api(**kwargs)
  File "/opt/dataiku-dss-12.1.3/python/dataiku/doctor/commands.py", line 343, in train_prediction_models_nosave
    transformed_train = pipeline.fit_and_process(train_df)
  File "/opt/dataiku-dss-12.1.3/python/dataiku/doctor/preprocessing/dataframe_preprocessing.py", line 2537, in fit_and_process
    new_mf = step.fit_and_process(input_df, cur_mf, result, self.generated_features_mapping)
  File "/opt/dataiku-dss-12.1.3/python/dataiku/doctor/prediction/feature_selection.py", line 66, in fit_and_process
    self.selection = get_feature_selector(
  File "/opt/dataiku-dss-12.1.3/python/dataiku/doctor/prediction/feature_selection.py", line 171, in fit
    names = self.get_pruned_names(mf, target)
  File "/opt/dataiku-dss-12.1.3/python/dataiku/doctor/prediction/feature_selection.py", line 205, in get_pruned_names

Tagged:

Answers

  • Konstantina
    Konstantina Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 25 ✭✭✭✭✭
    Options

    Hi,

    Could you give a little bit of more background e.g. what kind of data, selection of model (is it custom or do you use one from the DSS Lab?), what you are trying to achieve etc.?

    From the error you receive, I guess that what you are feeding to the model is None this is why it cannot be trained. Therefore, I recommend trying to check the preprocessing steps for any mistakes (for example check if any of your training columns is empty).

    -Konstantina

Setup Info
    Tags
      Help me…