Coder Social home page Coder Social logo

Comments (7)

shuttle1987 avatar shuttle1987 commented on July 27, 2024 1

I'm thinking that we can change the assert here to a warning based on a floating point close-equals that prints out a message to the user.

from persephone.

shuttle1987 avatar shuttle1987 commented on July 27, 2024 1

Thanks for the report, I'll get this fixed soon

from persephone.

tensorfoo avatar tensorfoo commented on July 27, 2024

assert test_per == test_ler

the assertion being failed on line 293 of model.py

from persephone.

shuttle1987 avatar shuttle1987 commented on July 27, 2024

Thanks for opening this issue.

@oadams I'd appreciate a comment about the intent behind the code that contains the assertion here:

assert test_per == test_ler
with open(os.path.join(hyps_dir, "test_per"), "w",
encoding=ENCODING) as per_f:
print("LER: %f" % (test_ler), file=per_f)

from persephone.

oadams avatar oadams commented on July 27, 2024

The assertion would have been to ensure that the tensorflow label error rate was consistent with what was measured by my implementation of minimum edit distance at some point. But it looks like utils.batch_per() is using the NLTK implementation of edit distance anyway. It could be a floating point precision thing, but I'd like to see what the actual values are since if that's the case it's a bit surprising this hasn't popped up so far.

Either way, the assert should probably go since it doesn't help anyone.

from persephone.

tensorfoo avatar tensorfoo commented on July 27, 2024

It could be a floating point precision thing, but I'd like to see what the actual values are since if that's the case it's a bit surprising this hasn't popped up so far.

Yup! Good intuition. I ran the training again and had it print the two variables just before the assertion:
test_per= 0.2878205128205128 test_ler= 0.28782052

I've also got it paused on the debugger on the assertion line if you guys want me to explore further, please let me know soon. For the record i've hit this bug 3/3 times i've run the training, so it seems pretty reproducible.

from persephone.

shuttle1987 avatar shuttle1987 commented on July 27, 2024

@tensorfoo Hopefully the changes I made in #224 resolve your issue, if not please let us know

from persephone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.