AutoML 提供了参数 [array] 的空值

问题描述

您好,我有以下代码:

df = load_data()
pd.set_option('display.max_columns',None)
pd.set_option('display.max_rows',None)
df.head(5)
df.dtypes
df = df.drop(['sdBillCancelledDate','vcReason','chOriginalBillNo'],axis=1)

df = df.select_dtypes(exclude=['datetime64[ns]'])
df.head(5)
df.dropna(inplace=True)
#clean_dataset(df)
df.head(500)

# Separate features and labels
X,y = df[['totalDaysToPay','paidOnTime','dcTotFeeBilledAmt','dcFinalBillExpAmt','dcTotProgBillAmt','dcTotProgBillExpAmt','dcReceiveBillAmt','dcTotWipHours','dcTotWipTargetAmt','dcTotNetBillAmt','chBillStatus','chBillType','chDebtorCode','OperatingUnit','BusinessUnit','LosCode']].values,df['paidInDays'].values
print('Features:',X[:10],'\nLabels:',y[:10],sep='\n')


from sklearn.model_selection import train_test_split

# Split data 70%-30% into training set and test set
X_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.30,random_state=0)

print ('Training Set: %d rows\nTest Set: %d rows' % (X_train.shape[0],X_test.shape[0]))


from azureml.core.workspace import Workspace
ws = Workspace.from_config()

import logging

automl_settings = {
    "iteration_timeout_minutes": 1000,"experiment_timeout_hours": 1,"enable_early_stopping": True,"primary_metric": 'spearman_correlation',"featurization": 'auto',"verbosity": logging.INFO,"n_cross_validations": 5
}

from azureml.train.automl import AutoMLConfig

automl_config = AutoMLConfig(task='regression',debug_log='automated_ml_errors.log',training_data=X_train,label_column_name="paidInDays",**automl_settings)

from azureml.core.experiment import Experiment
experiment = Experiment(ws,"ipower")
local_run = experiment.submit(automl_config,show_output=True)

但是我收到此错误:

ValidationException: ValidationException:
    Message: An empty value for argument [array] is provided.
    InnerException: None
    ErrorResponse 
{
    "error": {
        "code": "UserError","message": "An empty value for argument [array] is provided.","target": "array","inner_error": {
            "code": "BadArgument","inner_error": {
                "code": "ArgumentBlankOrEmpty"
            }
        }
    }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)