How to convert a non-iterable dataTable object into one that is iterable to unpack it?

Ghada 31 Reputation points
2022-10-29T17:05:09.247+00:00

I am calling the run function defined in the TrainAnomalyDetectionModelModule() in notebook to train a PCA-based anomaly detection algorithm. But when I use the score_generic() module, I receive a "cannot unpack non-iterable DataTabel object".

1. run() function

TrainAnomalyDetectionModelModule.run(learner=pca, training_data=amids_data_bal_train_dataTable)

. . . . . . . .
<azureml.studio.modules.anomaly_detection.initialize_models_anomaly_detection.pcabased_anomaly_detection.pcabased_anomaly_detection.PCAAnomalyDetectionModel object at 0x7fe05ae5c340>
2022-10-29 16:46:02,410 studio.core INFO TrainAnomalyDetectionModelModule.run - End with 2.8210s elapsed.
(<azureml.studio.modules.anomaly_detection.initialize_models_anomaly_detection.pcabased_anomaly_detection.pcabased_anomaly_detection.PCAAnomalyDetectionModel at 0x7fe05ae5c340>,)

2. score model

score_result, = score_generic(pca, amids_data_imb_test_dataTable, append_or_result_only= False)

TypeError: cannot unpack non-iterable DataTable object

. . . . .
2022-10-29 16:46:02,593 studio.module INFO Successfully predicted.
2022-10-29 16:46:02,594 studio.module INFO Anomaly Detection Task, Result Contains Scored Label.
2022-10-29 16:46:02,596 studio.module INFO Anomaly Detection Scored Columns are:
2022-10-29 16:46:02,597 studio.module INFO There are 2 score columns: "Anomaly Detection Assigned Labels,Calibrated Score"


TypeError Traceback (most recent call last)
Input In [62], in <cell line: 2>()
1 #score model
----> 2 score_result, = score_generic(pca, amids_data_imb_test_dataTable, append_or_result_only= False)

TypeError: cannot unpack non-iterable DataTable object

I appreciate your comment, suggestions, and help.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,794 questions
{count} votes