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

Error in test mode after faiss implementation #37

Open
HoseinHashemi opened this issue Jan 11, 2022 · 5 comments
Open

Error in test mode after faiss implementation #37

HoseinHashemi opened this issue Jan 11, 2022 · 5 comments

Comments

@HoseinHashemi
Copy link

HoseinHashemi commented Jan 11, 2022

Has anybody tried the code in the test mode after faiss implementation?
I believe that the line below needs to be added to the on_test_start method.

self.embedding_dir_path, self.sample_path, self.source_code_save_path = prep_dirs(self.logger.log_dir)

Otherwise, you'll get the error below:

AttributeError: 'STPM' object has no attribute 'embedding_dir_path'

And that makes sense because the attributes are not assigned yet, instead they are assigned after this point and also in on_train_start.

@HoseinHashemi HoseinHashemi changed the title test mode after faiss implementation Error in test mode after faiss implementation Jan 11, 2022
@mjack3
Copy link

mjack3 commented Jan 11, 2022

Yes, it need to be added.

@mjack3
Copy link

mjack3 commented Jan 11, 2022

Morevoer i can see a performance decay after faiss implementacion. I noticed that using the commit after e4cb4ba the performance is worst

@hcw-00
Copy link
Owner

hcw-00 commented Sep 29, 2022

@HoseinHashemi error occurred in test mode is fixed. please check #51

Has anybody tried the code in the test mode after faiss implementation? I believe that the line below needs to be added to the on_test_start method.

self.embedding_dir_path, self.sample_path, self.source_code_save_path = prep_dirs(self.logger.log_dir)

Otherwise, you'll get the error below:

AttributeError: 'STPM' object has no attribute 'embedding_dir_path'

And that makes sense because the attributes are not assigned yet, instead they are assigned after this point and also in on_train_start.

@hcw-00
Copy link
Owner

hcw-00 commented Sep 29, 2022

Morevoer i can see a performance decay after faiss implementacion. I noticed that using the commit after e4cb4ba the performance is worst

Hello. I didn't know that. I'll check. Thanks

@mjack3
Copy link

mjack3 commented Sep 29, 2022

Hello, that is because I installed FAISS using pip but conda works fine

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

3 participants