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

Modified some namespaces #3533

Merged
merged 7 commits into from
Mar 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using UnityEngine;
using MLAgents;
using MLAgents.Sensors;
using MLAgents.SideChannels;

public class Ball3DAgent : Agent
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using UnityEngine;
using MLAgents;
using MLAgents.Sensors;
using MLAgents.SideChannels;

public class Ball3DHardAgent : Agent
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using UnityEngine;
using MLAgents;
using MLAgents.Sensors;
using MLAgents.SideChannels;

public class BouncerAgent : Agent
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using UnityEngine;
using System.Linq;
using MLAgents;
using MLAgents.SideChannels;


public class GridArea : MonoBehaviour
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Barracuda;
using System.IO;
using MLAgents;
using MLAgents.Policies;

namespace MLAgentsExamples
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using UnityEngine;
using MLAgents;
using MLAgents.Policies;

public class AgentSoccer : Agent
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using UnityEngine.UI;
using MLAgents;
using MLAgents.Sensors;
using MLAgents.SideChannels;

public class TennisAgent : Agent
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using MLAgents;
using MLAgentsExamples;
using MLAgents.Sensors;
using MLAgents.SideChannels;

public class WalkerAgent : Agent
{
Expand Down
1 change: 1 addition & 0 deletions com.unity.ml-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Note that Barracuda 0.6.0 or later is required to import the `.onnx` files properly
- Multi-GPU training and the `--multi-gpu` option has been removed temporarily. (#3345)
- All Sensor related code has been moved to the namespace `MLAgents.Sensors`.
- All SideChannel related code has been moved to the namespace `MLAgents.SideChannels`.

### Minor Changes
- Monitor.cs was moved to Examples. (#3372)
Expand Down
3 changes: 2 additions & 1 deletion com.unity.ml-agents/Editor/BehaviorParametersEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using MLAgents.Sensors;
using UnityEditor;
using Barracuda;
using MLAgents.Policies;

namespace MLAgents.Editor
{
Expand Down Expand Up @@ -75,7 +76,7 @@ void DisplayFailedModelChecks()
}
if (brainParameters != null)
{
var failedChecks = InferenceBrain.BarracudaModelParamLoader.CheckModel(
var failedChecks = Inference.BarracudaModelParamLoader.CheckModel(
barracudaModel, brainParameters, sensorComponents);
foreach (var check in failedChecks)
{
Expand Down
1 change: 1 addition & 0 deletions com.unity.ml-agents/Editor/BrainParametersDrawer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using UnityEngine;
using UnityEditor;
using MLAgents.Policies;

namespace MLAgents.Editor
{
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Editor/DemonstrationDrawer.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Text;
using MLAgents;
using UnityEditor;
using MLAgents.Demonstrations;
using MLAgents.Policies;


namespace MLAgents.Editor
Expand Down
4 changes: 3 additions & 1 deletion com.unity.ml-agents/Runtime/Academy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#if UNITY_EDITOR
using UnityEditor;
#endif
using MLAgents.InferenceBrain;
using MLAgents.Inference;
using MLAgents.Policies;
using MLAgents.SideChannels;
using Barracuda;

/**
Expand Down
1 change: 1 addition & 0 deletions com.unity.ml-agents/Runtime/Agent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Barracuda;
using MLAgents.Sensors;
using MLAgents.Demonstrations;
using MLAgents.Policies;

namespace MLAgents
{
Expand Down
2 changes: 2 additions & 0 deletions com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
using System.Runtime.CompilerServices;
using MLAgents.Sensors;
using MLAgents.Demonstrations;
using MLAgents.Policies;


[assembly: InternalsVisibleTo("Unity.ML-Agents.Editor")]
[assembly: InternalsVisibleTo("Unity.ML-Agents.Editor.Tests")]
Expand Down
3 changes: 2 additions & 1 deletion com.unity.ml-agents/Runtime/Communicator/ICommunicator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using MLAgents.Policies;
using MLAgents.Sensors;
using MLAgents.SideChannels;

namespace MLAgents
{
Expand Down
2 changes: 2 additions & 0 deletions com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
using UnityEngine;
using MLAgents.CommunicatorObjects;
using MLAgents.Sensors;
using MLAgents.Policies;
using MLAgents.SideChannels;
using System.IO;
using Google.Protobuf;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using UnityEngine;
using MLAgents.Policies;

namespace MLAgents.Demonstrations
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Text.RegularExpressions;
using UnityEngine;
using System.IO;
using MLAgents.Policies;

namespace MLAgents.Demonstrations
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Google.Protobuf;
using System.Collections.Generic;
using MLAgents.Sensors;
using MLAgents.Policies;

namespace MLAgents.Demonstrations
{
Expand Down
1 change: 1 addition & 0 deletions com.unity.ml-agents/Runtime/DiscreteActionMasker.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MLAgents.Policies;

namespace MLAgents
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using System.Collections.Generic;
using System.Linq;
using Barracuda;
using MLAgents.InferenceBrain.Utils;
using MLAgents.Inference.Utils;
using UnityEngine;

namespace MLAgents.InferenceBrain
namespace MLAgents.Inference
{
/// <summary>
/// The Applier for the Continuous Action output tensor. Tensor is assumed to contain the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
using System.Linq;
using Barracuda;
using MLAgents.Sensors;
using MLAgents.Policies;

namespace MLAgents.InferenceBrain
namespace MLAgents.Inference
{
/// <summary>
/// Prepares the Tensors for the Learning Brain and exposes a list of failed checks if Model
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System;
using Barracuda;
using MLAgents.InferenceBrain.Utils;
using MLAgents.Inference.Utils;
using UnityEngine;
using MLAgents.Sensors;

namespace MLAgents.InferenceBrain
namespace MLAgents.Inference
{
/// <summary>
/// Reshapes a Tensor so that its first dimension becomes equal to the current batch size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
using Barracuda;
using UnityEngine.Profiling;
using MLAgents.Sensors;
using MLAgents.Policies;

namespace MLAgents.InferenceBrain
namespace MLAgents.Inference
{
internal struct AgentInfoSensorsPair
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using Barracuda;
using System;
using MLAgents.Policies;

namespace MLAgents.InferenceBrain
namespace MLAgents.Inference
{
/// <summary>
/// Mapping between the output tensor names and the method that will use the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Barracuda;
using MLAgents.Sensors;

namespace MLAgents.InferenceBrain
namespace MLAgents.Inference
{
/// <summary>
/// Mapping between Tensor names and generators.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace MLAgents.InferenceBrain
namespace MLAgents.Inference
{
/// <summary>
/// Contains the names of the input and output tensors for the Inference Brain.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using Barracuda;
using MLAgents.InferenceBrain.Utils;
using MLAgents.Inference.Utils;

namespace MLAgents.InferenceBrain
namespace MLAgents.Inference
{
/// <summary>
/// Tensor - A class to encapsulate a Tensor used for inference.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace MLAgents.InferenceBrain.Utils
namespace MLAgents.Inference.Utils
{
/// <summary>
/// Multinomial - Draws samples from a multinomial distribution given a (potentially unscaled)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace MLAgents.InferenceBrain.Utils
namespace MLAgents.Inference.Utils
{
/// <summary>
/// RandomNormal - A random number generator that produces normally distributed random
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using UnityEngine;
using Barracuda;
using System.Collections.Generic;
using MLAgents.InferenceBrain;
using System;
using MLAgents.Inference;
using MLAgents.Sensors;

namespace MLAgents
namespace MLAgents.Policies
{
/// <summary>
/// Where to perform inference.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEngine;
using UnityEngine.Serialization;

namespace MLAgents
namespace MLAgents.Policies
{
/// <summary>
/// The Factory to generate policies.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using UnityEngine;

namespace MLAgents
namespace MLAgents.Policies
{
/// <summary>
/// Whether the action space is discrete or continuous.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System;
using MLAgents.Sensors;

namespace MLAgents
namespace MLAgents.Policies
{
/// <summary>
/// The Heuristic Policy uses a hards coded Heuristic method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using MLAgents.Sensors;

namespace MLAgents
namespace MLAgents.Policies
{
/// <summary>
/// IPolicy is connected to a single Agent. Each time the agent needs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System;
using MLAgents.Sensors;

namespace MLAgents
namespace MLAgents.Policies
{
/// <summary>
/// The Remote Policy only works when training.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using Barracuda;
using MLAgents.InferenceBrain;
using MLAgents.Inference;

namespace MLAgents.Sensors
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System;
using UnityEngine;

namespace MLAgents
namespace MLAgents.SideChannels
{
/// <summary>
/// Side channel that supports modifying attributes specific to the Unity Engine.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System;
using System.Text;

namespace MLAgents
namespace MLAgents.SideChannels
{
/// <summary>
/// Interface for managing a collection of float properties keyed by a string variable.
Expand Down
Loading