Skip to content

Conversation

@AndreasKarasenko
Copy link
Contributor

Adds the option to pass num_workers to predict to speed up inference.
Tested for Zero, Few and Dynamic shot classes.

Copy link
Collaborator

@OKUA1 OKUA1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, please see the comment regarding the usage of the warnings.

predictions.append(self._predict_single(X[i]))

if num_workers > 1:
raise DeprecationWarning("Passing num_workers to predict is temporary and will be removed in the future.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think raising is preferred here as it interrupts the execution. I would suggest using warnings.warn instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@OKUA1 OKUA1 merged commit 8d5d9a8 into BeastByteAI:main Jun 9, 2024
@AndreasKarasenko
Copy link
Contributor Author

I'll add some documentation for this next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants