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

Added missing test files. #377

Merged
merged 2 commits into from
Nov 10, 2020
Merged

Added missing test files. #377

merged 2 commits into from
Nov 10, 2020

Conversation

simonpf
Copy link

@simonpf simonpf commented Oct 15, 2020

Fixes #376.

@olemke
Copy link
Member

olemke commented Oct 16, 2020

The current test failures in the Github Actions are caused by a broken Ubuntu mirror server and are not related to what I mention below. Fixed

Which version of keras are you using? The tests work for me on macOS with keras 2.3.1, but on Linux with keras 2.4.3 I get this error for test_save_qrnn:

___________________________________ TestQrnn.test_save_qrnn[keras] ____________________________________

self = <typhon.tests.retrieval.qrnn.test_qrnn.TestQrnn object at 0x7f1a80038790>, backend = 'keras'

    @pytest.mark.parametrize("backend", backends)
    def test_save_qrnn(self, backend):
        """
        Test saving and loading of QRNNs.
        """
        set_backend(backend)
        qrnn = QRNN(self.x_train.shape[1], np.linspace(0.05, 0.95, 10))
        f = tempfile.NamedTemporaryFile()
>       qrnn.save(f.name)

../../../.local/lib/python3.7/site-packages/typhon/tests/retrieval/qrnn/test_qrnn.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../.local/lib/python3.7/site-packages/typhon/retrieval/qrnn/qrnn.py:625: in save
    backend.save_model(f, self.model)
../../../.local/lib/python3.7/site-packages/typhon/retrieval/qrnn/models/keras.py:26: in save_model
    keras.models.save_model(model, f)
../../../miniconda3/lib/python3.7/site-packages/tensorflow/python/keras/saving/save.py:123: in save_model
    os.path.splitext(filepath)[1] in _HDF5_EXTENSIONS):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

p = <_io.BufferedWriter name='/tmp/tmpmhh5x6b8'>

    def splitext(p):
>       p = os.fspath(p)
E       TypeError: expected str, bytes or os.PathLike object, not _io.BufferedWriter

../../../miniconda3/lib/python3.7/posixpath.py:122: TypeError

@olemke olemke merged commit ee28dcc into atmtools:master Nov 10, 2020
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.

QRNN tests missing files
2 participants