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

Decoder refactor #54

Merged
merged 5 commits into from Jul 8, 2016
Merged

Decoder refactor #54

merged 5 commits into from Jul 8, 2016

Conversation

jindrahelcl
Copy link
Member

@jindrahelcl jindrahelcl commented Jul 5, 2016

Tests OK, I will merge this today if there's no objections.

EDIT: monster_decoder.py is the original decoder with (czech) comments. This will be deleted as soon as a separate copynet decoder is created and the code from monster_decoder is moved there. Another leftover code in the monster decoder is the scheduled sampling mechanism.

EDIT2. travis tests are not ok. investigating.. Nechápu, travis padá na python3 chybě, kterou zanesl @tomasmcz s commitem 'Fix everything', ale u mě na počítači to na ní nepadá a testy projdou.

@jlibovicky
Copy link
Contributor

File "/home/travis/build/ufal/neuralmonkey/bin/neuralmonkey/dataset.py", line 62, in create_series
file_type = magic.from_file(path, mime=True).decode()

To by mělo udělat z bytestreamu string, ale v ten okamžik už to zjevně string je, takže není důvod volat decode. Ačkoli u mě to taky prochází.

@jindrahelcl
Copy link
Member Author

Právě, když si zapnu svuj python3 a zkusim na string zavolat decode(), tak to padne, ale když pustim tohle, tak to nepadne. Takže se tam děje něco divnýho

@tomasmcz
Copy link
Member

tomasmcz commented Jul 5, 2016

As this is clearly happening in the part of code that was changed several commits ago and behaves differently at your local environment and clean environment on Travis, you should suspect a change in dependencies. And indeed, python-magic 0.4.12 was released and it now returns string instead of bytes. I fixed this in master and rebased. Your local tests worked, because you had older version of python-magic installed.

We should discuss freezing of dependencies in #55.

@tomasmcz
Copy link
Member

tomasmcz commented Jul 5, 2016

Btw. the discussion in #55 is something that I would like to be accessible in the future and therefore should be conducted in English. And since I want to refer to this PR as an example there, this should also have been in English. I really can't see any rational reason to write anything in Czech (and I find constant switching between languages quite bothersome).

@tomasmcz
Copy link
Member

tomasmcz commented Jul 5, 2016

I don't have time to read all the code right now, but at least the comment in mixer.py should be in English as well. I appreciate the detailed pylint: disable in decoder.py though.

@jindrahelcl
Copy link
Member Author

Merging, closing.

@jindrahelcl jindrahelcl merged commit 9f4a6c0 into master Jul 8, 2016
@jlibovicky jlibovicky deleted the decoder_refactor branch July 8, 2016 14:11
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

Successfully merging this pull request may close these issues.

None yet

3 participants