I am trying to use a train-only pipeline run to train some data with the MultiLabelTextClassification model. But the following error log was produced:
ERROR: Training failed for pipeline type: TRAIN_ONLY, error: malformed node or string: <ast.Name object at 0x7f1327022d30>
How do I interpret this and debug? If it helps, here is the full log:
Train only of MultiLabelPack 23.5.0.0 launched - Run 96b8db6f-1e66-44e4-90a4-a6bbb3be3bc9
Train only of MultiLabelPack 23.5.0.0 started - Run 96b8db6f-1e66-44e4-90a4-a6bbb3be3bc9
Train only of MultiLabelPack 23.5.0.0 scheduled - Run 96b8db6f-1e66-44e4-90a4-a6bbb3be3bc9
Train only of MultiLabelPack 23.5.0.0 failed - Run 96b8db6f-1e66-44e4-90a4-a6bbb3be3bc9
Error Details : Pipeline failed due to ML Package Issue
2023-08-08 04:01:05,232 - UiPath_core.trainer_run:main:74 - INFO: Starting training job…
2023-08-08 04:01:07,353 - UiPath_core.storage.azure_storage_client:download:118 - INFO: Dataset from bucket folder training-a0394d57-9d8b-4ee7-9b15-97c89266114e/cdd1a17c-7e4d-46ef-ad79-4c48ab6eac9e/94a4d594-4772-4c95-80ae-7a47186275bb with size 1 downloaded successfully
2023-08-08 04:01:07,353 - UiPath_core.training_plugin:train_model:130 - INFO: Start model training…
2023-08-08 04:01:07,353 - UiPath_core.training_plugin:initialize_model:124 - INFO: Start model initialization…
2023-08-08 04:01:07,354 - root:init:35 - INFO: Using options: {‘cuda’: True, ‘dataset’: {‘path’: ‘/microservice/dataset’, ‘csv_name’: None, ‘text_column_name’: ‘Description’, ‘target_column_name’: ‘Subcategory’, ‘delimiter’: ‘,’, ‘train_split’: 0.9, ‘encoding’: ‘utf-8’, ‘dataloader_workers’: 0}, ‘model’: {‘name’: ‘test’, ‘epochs’: 10, ‘tqdm’: True, ‘batch_size’: 24, ‘optimizer’: {‘transformer’: True}, ‘scheduler’: {‘type’: ‘hf’, ‘parameters’: {‘name’: ‘linear’}}, ‘gradient_accumulation_steps’: 1, ‘metrics’: [‘f1’, ‘ECC’], ‘path’: ‘/microservice/models/test’}, ‘network’: {‘name’: ‘roberta-base’, ‘freeze’: True}, ‘split_and_eval’: False}
2023-08-08 04:01:07,355 - UiPath_core.training_plugin:initialize_model:127 - INFO: Model initialized successfully
2023-08-08 04:01:07,355 - root:read_csv:103 - INFO: Loading data from /microservice/dataset/RogersTrainingData No 0X92.csv
2023-08-08 04:01:07,360 - UiPath_core.training_plugin:model_run:179 - ERROR: Training failed for pipeline type: TRAIN_ONLY, error: malformed node or string: <ast.Name object at 0x7f1327022d30>
2023-08-08 04:01:07,360 - UiPath_core.trainer_run:main:91 - ERROR: Training Job failed, error: malformed node or string: <ast.Name object at 0x7f1327022d30>
Traceback (most recent call last):
File “/home/aicenter/.local/lib/python3.9/site-packages/UiPath_core/trainer_run.py”, line 86, in main
wrapper.run()
File “/microservice/training_wrapper.py”, line 58, in run
return self.training_plugin.model_run()
File “/home/aicenter/.local/lib/python3.9/site-packages/UiPath_core/training_plugin.py”, line 195, in model_run
raise ex
File “/home/aicenter/.local/lib/python3.9/site-packages/UiPath_core/training_plugin.py”, line 171, in model_run
self.run_train_only()
File “/home/aicenter/.local/lib/python3.9/site-packages/UiPath_core/training_plugin.py”, line 255, in run_train_only
self.train_model(self.local_dataset_directory)
File “/home/aicenter/.local/lib/python3.9/site-packages/UiPath_core/training_plugin.py”, line 132, in train_model
response = self.model.train(directory)
File “/microservice/train.py”, line 42, in train
self.process_data(split=True)
File “/microservice/train.py”, line 87, in process_data
dfs = [self.read_csv(file_path) for file_path in csv_files]
File “/microservice/train.py”, line 87, in
dfs = [self.read_csv(file_path) for file_path in csv_files]
File “/microservice/train.py”, line 111, in read_csv
df[target_col] = df[target_col].apply(ast.literal_eval)
File “/home/aicenter/.local/lib/python3.9/site-packages/pandas/core/series.py”, line 4626, in apply
return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
File “/home/aicenter/.local/lib/python3.9/site-packages/pandas/core/apply.py”, line 1025, in apply
return self.apply_standard()
File “/home/aicenter/.local/lib/python3.9/site-packages/pandas/core/apply.py”, line 1076, in apply_standard
mapped = lib.map_infer(
File “pandas/_libs/lib.pyx”, line 2834, in pandas._libs.lib.map_infer
File “/usr/local/lib/python3.9/ast.py”, line 105, in literal_eval
return _convert(node_or_string)
File “/usr/local/lib/python3.9/ast.py”, line 104, in _convert
return _convert_signed_num(node)
File “/usr/local/lib/python3.9/ast.py”, line 78, in _convert_signed_num
return _convert_num(node)
File “/usr/local/lib/python3.9/ast.py”, line 69, in _convert_num
_raise_malformed_node(node)
File “/usr/local/lib/python3.9/ast.py”, line 66, in _raise_malformed_node
raise ValueError(f’malformed node or string: {node!r}')
ValueError: malformed node or string: <ast.Name object at 0x7f1327022d30>
2023-08-08 04:01:07,363 - UiPath_core.trainer_run:main:98 - INFO: Job run stopped.