How To Use ML Model in Workflow

i am currently stucked on, how i can train & use the the ML model to get the result better and better

added the ML extractor and trainer properly passed the API key and endpoint

flow is not throwing any exception but it is not Providing better results in every run.

the ML trainer is Creating new Document and metadata in each run without any prediction.

Hi @H_khot

You have to provide the ML skill also this ML skill can create in the AI Center.
You have to train the documents in the AI Center. After runs the pipeline in AI Center the confidence score will be good.
Then only the data is extracts properly from the documents.

Hope it helps!!

yes i have provided the ML skill & ml package

i have used the Data labelling and imported that data to Ai center

so should i have to created pipeline

Yes you must create a pipeline. @H_khot

Hi @H_khot

Creating pipeline is mandatory to use the ml capability in UiPath studio.
After importing the dataset, create pipeline to combine the training data and the ml package.

Use this video for getting more details:

should i have to do any configuration

My Pipeline has failed with error cannot find root directory for dataset.

so i have to do any configuration in environment variables

Train only of InvoiceExtractionMLPackage 23.4.1.0 launched - Run bbd2210e-0aba-4b09-988a-1f17ab5ce8f2
Train only of InvoiceExtractionMLPackage 23.4.1.0 started - Run bbd2210e-0aba-4b09-988a-1f17ab5ce8f2
Train only of InvoiceExtractionMLPackage 23.4.1.0 scheduled - Run bbd2210e-0aba-4b09-988a-1f17ab5ce8f2
Train only of InvoiceExtractionMLPackage 23.4.1.0 failed - Run bbd2210e-0aba-4b09-988a-1f17ab5ce8f2

Error Details : Pipeline failed due to ML Package Issue

2023-07-27 11:01:35,219 - UiPath_core.trainer_run:main:74 - INFO: Starting training job…
2023-07-27 11:01:38,983 - matplotlib:_get_config_or_cache_dir:526 - WARNING: Matplotlib created a temporary config/cache directory at /tmp/matplotlib-7w2e25rc because the default path (/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
2023-07-27 11:01:39,286 - matplotlib.font_manager:_load_fontmanager:1544 - INFO: generated new fontManager
2023-07-27 11:02:08,093 - UiPath_core.storage.azure_storage_client:download:118 - INFO: Dataset from bucket folder training-cfef20ef-6d20-457d-91aa-70327e3e1236/69aa9f81-a0cb-433a-9c3b-4786c091e196/52e79312-a662-4ae9-9817-7988c036a866 with size 709 downloaded successfully
2023-07-27 11:02:08,094 - UiPath_core.training_plugin:train_model:129 - INFO: Start model training…
2023-07-27 11:02:08,094 - UiPath_core.training_plugin:initialize_model:123 - INFO: Start model initialization…
2023-07-27 11:02:08,095 - root:initialize_package:195 - INFO: Using package type provided by runtime argument with value: invoices
2023-07-27 11:02:08,095 - root:initialize_package:204 - INFO: Initializing invoices package options …
2023-07-27 11:02:08,097 - root:_valid_doctype_folder_structure:92 - ERROR: schema.json is empty / does not exist for invoices dataset
2023-07-27 11:02:08,097 - UiPath_core.training_plugin:model_run:189 - ERROR: Training failed for pipeline type: TRAIN_ONLY, error: Document type invoices not valid, check that document type data is in dataset folder and follows folder structure.
2023-07-27 11:02:08,199 - UiPath_core.trainer_run:main:91 - ERROR: Training Job failed, error: Document type invoices not valid, check that document type data is in dataset folder and follows folder structure.
Traceback (most recent call last):
File “/model/bin/UiPath_core/trainer_run.py”, line 86, in main
wrapper.run()
File “/workspace/model/microservice/training_wrapper.py”, line 64, in run
return self.training_plugin.model_run()
File “/model/bin/UiPath_core/training_plugin.py”, line 205, in model_run
raise ex
File “/model/bin/UiPath_core/training_plugin.py”, line 181, in model_run
self.run_train_only()
File “/model/bin/UiPath_core/training_plugin.py”, line 268, in run_train_only
score = self.train_model(self.local_dataset_directory)
File “/model/bin/UiPath_core/training_plugin.py”, line 131, in train_model
response = self.model.train(directory)
File “/model/bin/UiPath_core/training_plugin.py”, line 119, in model
self.initialize_model()
File “/model/bin/UiPath_core/training_plugin.py”, line 125, in initialize_model
self._model = train.Main()
File “/workspace/model/microservice/train.py”, line 21, in init
self.opt = package_util.initialize_package(args)
File “”, line 206, in initialize_package
File “”, line 144, in get_package_opt
File “”, line 78, in configure_pipeline_options
File “”, line 139, in configure_options
Exception: Document type invoices not valid, check that document type data is in dataset folder and follows folder structure.
2023-07-27 11:02:08,200 - UiPath_core.trainer_run:main:98 - INFO: Job run stopped.