Logical bug?
Closed this issue · 3 comments
nizish commented
This code looks illogical.
If new_opt
doesn't have fasttext
set new_opt.fasttext
on saved_opt
.
if not (hasattr(new_opt, "fasttext")):
setattr(saved_opt, "fasttext", new_opt.fasttext)
EmpatheticDialogues/empchat/models.py
Line 70 in 9649114
EricMichaelSmith commented
Hmm, yeah, that looks very fishy - it's been a few years since I've used this code, but I imagine that "fasttext" was never missing from new_opt
or something and so maybe we didn't notice this issue. Is it a blocker for you being able to use this code?
nizish commented
No, as I went thru the code I found it. There were more patterns like this.
EricMichaelSmith commented
Okay, thanks for letting me know this - I don't have bandwidth to make and test a patch myself, but it's good to know this for others who encounter this issue!