如何解决在Azure机器学习python SDK中传递给automl_classifier的图像数据遇到EmptyDataException错误
我正在尝试使用https://docs.microsoft.com/en-us/azure/machine-learning/how-to-configure-environment#local
中提到的设置在conda环境中的本地PC上运行 azure automl (MacOS Catalina:10.15.6)。目标是使用Azureureml对二进制颜色图像分类找到最佳的模型和参数。
培训数据示例:
train_data_img = train_data.copy()
for index in tqdm(train_data.index):
img_file = train_data_img['image_file'][index]
image = cv2.imread(img_file)
img_resized = cv2.resize(image,(256,256))
img_numpy = np.array(img_resized)
train_data_img['np_image'][index] = img_numpy
print(train_data_img.head())
type(train_data_img)
np_image y 474 [[[0,0],[0,... 0 2121 [[[0,... 0 1836 [[[0,... 1 94 [[[0,... 0 663 [[[0,... 0
pandas.core.frame.DataFrame
在本地PC上运行automl的代码:
automl_classifier=AutoMLConfig(
task='classification',primary_metric='AUC_weighted',experiment_timeout_minutes=5,blocked_models=['XGBoostClassifier'],training_data=train_data_img,label_column_name=label,n_cross_validations=2)
from azureml.core.experiment import Experiment
ws = Workspace.from_config()
# Choose a name for the experiment and specify the project folder.
experiment_name = 'automl-classification'
project_folder = './sample_projects/automl-classification'
experiment = Experiment(ws,experiment_name)
run = experiment.submit(automl_config,show_output=True)
~/.conda/envs/myenv/lib/python3.7/site-packages/azureml/automl/runtime/training_utilities.py
在_extract_user_data中(用户脚本) (2211) 2212“未定义获取数据脚本和X,” -> 2213“未提供y输入。”,has_pii = False) 2214试试: 2215 output = user_script.get_data()#类型:Union [Dict [str,Any],Tuple [Any,Any,Any,Any]]
EmptyDataException: EmptyDataException: Message: Get data script was not defined and X,y inputs were not provided. InnerException: None ErrorResponse { "error": { "code": "UserError","inner_error": { "code": "InvalidData","inner_error": { "code": "EmptyData" } },"message": "Get data script was not defined and X,y inputs were not provided." } }
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。