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

Validation in CRF mode #18

Closed
furkanpala opened this issue Oct 21, 2022 · 2 comments
Closed

Validation in CRF mode #18

furkanpala opened this issue Oct 21, 2022 · 2 comments

Comments

@furkanpala
Copy link

Hi, thanks for your effort.

I noticed a problem in the pipeline.train_val_utils.validate when we are running on crf classifier mode such that the inference function the crf.py returns the predicted target sequence (which is actually predicted class ids), not the probabilities for each class. Then, pipeline.train_val_utils.validate function, we are getting the predicted class ids by running torch.argmax. However, as I said, we do not have the probailities here, instead we directly have the predicted class ids.

I think we can solve this by adding a is_crf argument in the pipeline.train_val_utils.validate function and an if block decides to apply the argmax or not.

Also, irrelevant but there is a type here

Thanks, sincerely.

@ZeningLin
Copy link
Owner

Hi~

When using the crf decoder, the seqeval library will be used as the evaluation metric, in this case only the predicted class is needed. Maybe a restriction should be added in the validation step. I will work on it later~

@furkanpala
Copy link
Author

Thanks...

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

No branches or pull requests

2 participants