Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classification_report is going really slow for mode='strict' #62

Closed
eloukas opened this issue Oct 16, 2020 · 4 comments · Fixed by #63
Closed

Classification_report is going really slow for mode='strict' #62

eloukas opened this issue Oct 16, 2020 · 4 comments · Fixed by #63
Labels
enhancement New feature or request

Comments

@eloukas
Copy link

eloukas commented Oct 16, 2020

I have a dummy dataset in my local machine.
While my sklearn token-level evaluation (strict mode on/off) and my seqeval entity-level evaluation (strict mode off) run all together in 5 seconds, for some reason the seqeval entity-level evaluation with arg mode='strict' takes around 70 seconds, which is too much.

Is there any way to speed it up somehow? Maybe the code needs to get more optimized?

I can't run experiments with more data on my AWS machine using mode='strict'.
The evaluation on mode='strict' takes more time than the training of the neural models.

Many thanks!

  • Operating System: Ubuntu 18 (LTS)
  • Python Version: 3.8
  • Package Version: 1.1.0
@Hironsan Hironsan added the enhancement New feature or request label Oct 16, 2020
@Hironsan
Copy link
Member

Profile:

  1. unique_labels
  2. extended_tokens
  3. is_valid
  4. Enum is slow

@eloukas
Copy link
Author

eloukas commented Oct 16, 2020

What do you mean? Do you want me to report you anything from my current program?
Thank you again.

@Hironsan
Copy link
Member

I performed the profiling and found it takes a long time to execute the above.
I'm thinking about how to solve the problem now.

By the way, what the number of samples did you try to evaluate?

@eloukas
Copy link
Author

eloukas commented Oct 16, 2020

Oh, ok, cool!
In my dummy dataset, the numbers of gold/predicted tokens are 8721.
(I have them all in a list of a single list.)

In my big dataset in the cloud, I probably have one gazzilion millions of these :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants