Repository navigation
[WIP] Test data generation fixes for array_annotations - #656
Closed
muellerbjoern wants to merge 2 commits into
Closed
muellerbjoern wants to merge 2 commits into
muellerbjoern wants to merge 2 commits into
Conversation
Simple solution that also requires changes in Elephant
|
Hello @bjoern1001001! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
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. |
Member
|
Closing this, since we plan to refactor the test data generation entirely. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,dimandshapeinfake_neoandget_fake_value/get_fake_valuesare supposed to do. It seems to me that sometimesnis actually used to define shape, andshapemight be appended to the final shapedimtimes etc. If anybody knows this, I could try to restore consistent output in a general way that can handle any objects.