splade icon indicating copy to clipboard operation
splade copied to clipboard

Flops calcualtion

Open wolu0901 opened this issue 2 years ago • 2 comments

Hello!

I find that when I run flops, it always returns Nan.

I see your last commit fixed "force new", and changed line 25 in transformer_evaluator.py to force_new=True, but in inverted_index.py line 23, seems that the self.n will return 0 if force_new is True.

The flops no longer return nan after I remove the "force_new=True".

Am I doing sth wrong here? And how should I get the correct flops..

Thank you! Allen

wolu0901 avatar Oct 03 '22 04:10 wolu0901

Hi,

Oops that is something we did wrong, I'm going to fix this ASAP (but my ASAP should take a while, maybe a week unfortunately ), but your quick fix is correct (we just have to add a parameter so that for flops force_new is set to false, but when creating index is set to true). You should have correct flops values after removing the force_new=True, unless it overwrote your index (but I don't think this happened).

Also sorry for the delay, I had read the message before and thought I had already answered...

cadurosar avatar Oct 05 '22 14:10 cadurosar

Hi!

Yeh, it did not overwrite the index. And I just saw another issue have the same title, I should have a better naming convention here lol.

Thank you! Allen

wolu0901 avatar Oct 05 '22 16:10 wolu0901

Sorry, I completely lost track of this, just submitted a PR to fix it.

cadurosar avatar Feb 27 '23 01:02 cadurosar