Skip to content

[Bug Fix] Serialization of vectorActionSpace#5220

Merged
vincentpierre merged 2 commits into
mainfrom
fix-serialization
Apr 6, 2021
Merged

[Bug Fix] Serialization of vectorActionSpace#5220
vincentpierre merged 2 commits into
mainfrom
fix-serialization

Conversation

@vincentpierre

@vincentpierre vincentpierre commented Apr 5, 2021

Copy link
Copy Markdown
Contributor

Proposed change(s)

Fixing bug here : https://unity.slack.com/archives/C01H5LE96RE/p1617640959055900
The issue is that internal fields are not serialized by default like public fields and that the default DiscreteBranches is no longer null but Array.Empty.

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

@vincentpierre vincentpierre requested a review from chriselion April 5, 2021 18:39
@vincentpierre vincentpierre self-assigned this Apr 5, 2021

@chriselion chriselion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix itself looks fine. But considering we already broke this twice, we need a test that loads an old asset and makes sure the actions are preserved.

@vincentpierre vincentpierre merged commit 8f14b25 into main Apr 6, 2021
@delete-merged-branch delete-merged-branch Bot deleted the fix-serialization branch April 6, 2021 23:51
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants