Skip to content

[WIP] Test data generation fixes for array_annotations - #656

Closed
muellerbjoern wants to merge 2 commits into
NeuralEnsemble:masterfrom
muellerbjoern:fix/fake_values
Closed

muellerbjoern wants to merge 2 commits into
NeuralEnsemble:masterfrom
muellerbjoern:fix/fake_values

Conversation

@muellerbjoern

Copy link
Copy Markdown
Contributor

With the introduction of array_annotations in neo 0.7 the generation of test data (fake_neo, get_fake_values) has changed a bit. The resulting data are not consistent (in length) any more causing tests in Elephant to fail (see NeuralEnsemble/elephant#192).
So far this PR is a quick and dirty fix to solve those problems by hardcoding the length of every object that has array_annotations.

Of course, this is not the desired behavior. Instead it would be good to make random generation consistent again. When I looked into this, I found out that Epoch is handled separately causing quite a few difficulties. By hardcoding the length I could trivially remove this special case. But since there is no such function for Events I assume this consistency can be accomplished without any special cases or hardcoding.
When I tried to do this, however, I noticed some pieces of code I could not understand. I also didn't find any documentation regarding the desired behavior. So before implementing any changes I wanted to check what the parameters n, dim and shape in fake_neo and get_fake_value/get_fake_values are supposed to do. It seems to me that sometimes n is actually used to define shape, and shape might be appended to the final shape dim times etc. If anybody knows this, I could try to restore consistent output in a general way that can handle any objects.

@pep8speaks

Copy link
Copy Markdown

Hello @bjoern1001001! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 289:9: E265 block comment should start with '# '
Line 291:9: E265 block comment should start with '# '
Line 387:5: E265 block comment should start with '# '
Line 389:5: E265 block comment should start with '# '

@apdavison

Copy link
Copy Markdown
Member

My feeling is that the generation of test data needs to be simplified, as no-one currently active in the project really understands how it works any more, and it is slowing down development. This is unfortunately a big job, most likely.

@apdavison

Copy link
Copy Markdown
Member

Closing this, since we plan to refactor the test data generation entirely.

@apdavison apdavison closed this Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants