-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Making some fields and properties internal #3342
Conversation
@@ -710,7 +710,7 @@ void _AgentReset() | |||
AgentReset(); | |||
} | |||
|
|||
public void UpdateAgentAction(AgentAction action) | |||
internal void UpdateAgentAction(AgentAction action) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just remove this and UpdateVectorAction? I don't think they're used anywhere currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed it
Looks good aside from Academy.EnvironmentStep and the whitespace. |
@@ -11,7 +11,7 @@ namespace MLAgents | |||
/// </summary> | |||
[RequireComponent(typeof(Agent))] | |||
[AddComponentMenu("ML Agents/Demonstration Recorder", (int)MenuGroup.Default)] | |||
public class DemonstrationRecorder : MonoBehaviour | |||
internal class DemonstrationRecorder : MonoBehaviour |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we make the class internal, can users still add it to the GameObjects in the editor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes (but I don't know why)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes it possible to add the component but not possible to get the component via script (gameObject.GetComponent<TheComponentIsInternalSoICannotDoThis>()
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's talk about it more tomorrow. This feels like the sort of thing that someone might want to access from code; I think we should err on the side of keeping it accessible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you hold off on this one for now? I'd like to do a refactor pass on the DemonstrationRecorder/Store separately from this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
@@ -24,7 +24,7 @@ public class WriteAdapter | |||
/// <param name="data">Float array or list that will be written to.</param> | |||
/// <param name="shape">Shape of the observations to be written.</param> | |||
/// <param name="offset">Offset from the start of the float data to write to.</param> | |||
public void SetTarget(IList<float> data, int[] shape, int offset) | |||
internal void SetTarget(IList<float> data, int[] shape, int offset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to keep this class public; it would be impossible to test a custom sensor without these methods.
@@ -4,7 +4,7 @@ | |||
|
|||
namespace MLAgents | |||
{ | |||
public class Startup : MonoBehaviour | |||
internal class Startup : MonoBehaviour |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we use this anywhere? It feels like it should be in the examples code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yeah. That's my bad. I can move it after this PR lands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use this script for switching the scenes before the training starts. So not really belong to the examples code. Should live where the Startup scene lives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the startup scene is in the example environments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, above I said I should have moved it to the Project
folder.
…rite adapter and the demorecorder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's ship this; I'll do another pass with the doc that we came up with last week.
No description provided.