fix: remove descriptors squeeze() to fix 1D-BD tasks #41
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.
This PR aims to fix the container addition for 1D-BD tasks. With the current container implementation, 1D-BD tasks such as the Hopper-uni task for example (
hopper_uni
) returns the following error:This is due to the
squeeze
of the descriptors done in theadd()
method of the repertoire. Thesesqueeze
are necessary for the fitnesses and indices as these arrays are explicitlyexpand_dims
at the beginning of theadd()
method. However it is not needed for the descriptors that are not modified in theadd()
method.Thus as a fix I propose to remove the
squeeze
for the descriptors.This change should not impact the results, but just in case I attached the experimental comparison on GPU with the original container implementation and the new proposed container implementation on the
ant_omni
andwalker2d_uni
tasks. I ran 5 replications, the difference between runs is due to the non-deterministic nature of computation on GPU. I also added the results for thehopper_uni
after the fix.