Skip to content
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

Merged
merged 7 commits into from Feb 4, 2020

Conversation

vincentpierre
Copy link
Contributor

No description provided.

@@ -710,7 +710,7 @@ void _AgentReset()
AgentReset();
}

public void UpdateAgentAction(AgentAction action)
internal void UpdateAgentAction(AgentAction action)
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it

@chriselion
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

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)

Copy link
Contributor Author

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>())

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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)
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor

@chriselion chriselion left a 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.

@vincentpierre vincentpierre merged commit 5b9b8ff into master Feb 4, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-make-methods-internal branch February 4, 2020 19:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2021
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.

None yet

4 participants