Skip to content

Conversation

@etqadkhan
Copy link

With reference to #1558
When using a RoBERTa model for doing prediction, when the model is loaded using ClassificationModel() it prompts a warning stating,

UserWarning: use_multiprocessing automatically disabled as xlmroberta fails when using multiprocessing for feature conversion.

When prediction is performed on text data, if the number of records are a little more than a handful, the prediction progress bar takes infinite execution.

The issue occurs because in the classification_model.py file under the ClassificationModel class, there are two arguments that concern with multiprocessing, them being, args.use_multiprocessing and args.use_multiprocessing_for_evaluation. While one is set to False by default, the other remains to be True,as can be seen in the screenshot attached:

image




To be able to perform prediction by successfully disabling multiprocessing, we need to disable args.use_multiprocessing_for_evaluation = False and it should work fine. The approach has been tested locally and has proven to be working. Screenshot attached:

working

@wesngoh
Copy link

wesngoh commented Oct 26, 2024

Faced a similar issue and am glad to have found your workaround, im surprised this have not been pushed after a year.

@stale
Copy link

stale bot commented Oct 19, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale This issue has become stale label Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This issue has become stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants