Skip to content

Commit 56faf4e

Browse files
miguelalonsojrGitHub Enterprise
authored andcommitted
Fixed failing tests. (#24)
* Fixed failing tests. * Updated validate meta files. * Updated com.unity.ml-agents submodule. * Added default execution order to com.unity.ml-agents package are removed it from main project. * Updated com.unity.ml-agents submodule. Fixed agent scripts that implemented Awake for refactored com.unity.ml-agents Agent. * Updated submodule. * Fixed execution order issue with ProjectSetttingsOverride. * Updated protobuf make file. * Updated c# package submodule.
1 parent e22d651 commit 56faf4e

File tree

12 files changed

+89
-54
lines changed

12 files changed

+89
-54
lines changed

DevProject/Assets/ML-Agents/Scripts/Tests/Editor/Performance/SensorPerformanceTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void RunAgent<T>(int numSteps, int obsSize, ObservableAttributeOptions obsOption
110110
var behaviorParams = agent.GetComponent<BehaviorParameters>();
111111
behaviorParams.BrainParameters.VectorObservationSize = obsSize;
112112
behaviorParams.ObservableAttributeHandling = obsOptions;
113-
113+
agent.Awake();
114114
agent.LazyInitialize();
115115
for (var i = 0; i < numSteps; i++)
116116
{
@@ -148,9 +148,9 @@ public void TestObservableFieldAgent()
148148
public void TestObservablePropertyAgent()
149149
{
150150
Measure.Method(() =>
151-
{
152-
RunAgent<ObservablePropertyAgent>(k_NumAgentSteps, 0, ObservableAttributeOptions.ExcludeInherited);
153-
})
151+
{
152+
RunAgent<ObservablePropertyAgent>(k_NumAgentSteps, 0, ObservableAttributeOptions.ExcludeInherited);
153+
})
154154
.MeasurementCount(k_MeasurementCount)
155155
.GC()
156156
.Run();

DevProject/Assets/ML-Agents/Scripts/Tests/Runtime/AcademyTest/AcademyStepperTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ public class AcademyStepperTest
1515
[SetUp]
1616
public void Setup()
1717
{
18+
// We need register the communicator first before accessing the Academy.
19+
CommunicatorFactory.Register<ICommunicator>(RpcCommunicator.Create);
1820
Academy.Instance.Dispose();
1921
SceneManager.LoadScene("ML-Agents/Scripts/Tests/Runtime/AcademyTest/AcademyStepperTestScene");
22+
var academy = Academy.Instance;
2023
}
2124

2225
/// <summary>

Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Agent.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ public class Match3Agent : Agent
7676
private ModelOverrider m_ModelOverrider;
7777

7878
private const float k_RewardMultiplier = 0.01f;
79-
void Awake()
79+
protected override void Awake()
8080
{
81+
base.Awake();
8182
Board = GetComponent<Match3Board>();
8283
m_ModelOverrider = GetComponent<ModelOverrider>();
8384
}

Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ public class PushAgentBasic : Agent
5151

5252
EnvironmentParameters m_ResetParams;
5353

54-
void Awake()
54+
protected override void Awake()
5555
{
56+
base.Awake();
5657
m_PushBlockSettings = FindObjectOfType<PushBlockSettings>();
5758
}
5859

Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentCollab.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ public class PushAgentCollab : Agent
99
private PushBlockSettings m_PushBlockSettings;
1010
private Rigidbody m_AgentRb; //cached on initialization
1111

12-
void Awake()
12+
protected override void Awake()
1313
{
14+
base.Awake();
1415
m_PushBlockSettings = FindObjectOfType<PushBlockSettings>();
1516
}
1617

Project/Assets/ML-Agents/Examples/PushBlockWithInput/Scripts/PushBlockWithInputAgentBasic.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ public class PushBlockWithInputAgentBasic : Agent
4444

4545
EnvironmentParameters m_ResetParams;
4646

47-
void Awake()
47+
protected override void Awake()
4848
{
49+
base.Awake();
4950
m_PushBlockSettings = FindObjectOfType<PushBlockWithInputSettings>();
5051

5152
goalDetect = block.GetComponent<GoalDetectWithInput>();

Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ProjectSettingsOverrides.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Unity.MLAgentsExamples
99
/// This can modify some Physics and time-stepping properties, so you
1010
/// shouldn't copy it into your project unless you know what you're doing.
1111
/// </summary>
12+
[DefaultExecutionOrder(4)]
1213
public class ProjectSettingsOverrides : MonoBehaviour
1314
{
1415
// Original values

Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ProjectSettingsOverrides.cs.meta

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Project/ProjectSettings/ProjectSettings.asset

Lines changed: 57 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
--- !u!129 &1
44
PlayerSettings:
55
m_ObjectHideFlags: 0
6-
serializedVersion: 20
6+
serializedVersion: 22
77
productGUID: cd7e9a0e0d1d14312ad9e89757262f3b
88
AndroidProfiler: 0
99
AndroidFilterTouchesWhenObscured: 0
@@ -49,6 +49,8 @@ PlayerSettings:
4949
m_StereoRenderingPath: 0
5050
m_ActiveColorSpace: 0
5151
m_MTRendering: 1
52+
mipStripping: 0
53+
numberOfMipsStripped: 0
5254
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
5355
iosShowActivityIndicatorOnLoading: -1
5456
androidShowActivityIndicatorOnLoading: -1
@@ -66,6 +68,12 @@ PlayerSettings:
6668
androidRenderOutsideSafeArea: 0
6769
androidUseSwappy: 0
6870
androidBlitType: 0
71+
androidResizableWindow: 0
72+
androidDefaultWindowWidth: 1920
73+
androidDefaultWindowHeight: 1080
74+
androidMinimumWindowWidth: 400
75+
androidMinimumWindowHeight: 300
76+
androidFullscreenMode: 1
6977
defaultIsNativeResolution: 1
7078
macRetinaSupport: 1
7179
runInBackground: 1
@@ -117,7 +125,9 @@ PlayerSettings:
117125
stadiaTargetFramerate: 0
118126
vulkanNumSwapchainBuffers: 3
119127
vulkanEnableSetSRGBWrite: 0
128+
vulkanEnablePreTransform: 0
120129
vulkanEnableLateAcquireNextImage: 0
130+
vulkanEnableCommandBufferRecycling: 1
121131
m_SupportedAspectRatios:
122132
4:3: 1
123133
5:4: 1
@@ -132,31 +142,6 @@ PlayerSettings:
132142
xboxOneDisableKinectGpuReservation: 0
133143
xboxOneEnable7thCore: 0
134144
vrSettings:
135-
cardboard:
136-
depthFormat: 0
137-
enableTransitionView: 0
138-
daydream:
139-
depthFormat: 0
140-
useSustainedPerformanceMode: 0
141-
enableVideoLayer: 0
142-
useProtectedVideoMemory: 0
143-
minimumSupportedHeadTracking: 0
144-
maximumSupportedHeadTracking: 1
145-
hololens:
146-
depthFormat: 1
147-
depthBufferSharingEnabled: 0
148-
lumin:
149-
depthFormat: 0
150-
frameTiming: 2
151-
enableGLCache: 0
152-
glCacheMaxBlobSize: 524288
153-
glCacheMaxFileSize: 8388608
154-
oculus:
155-
sharedDepthBuffer: 0
156-
dashSupport: 0
157-
lowOverheadMode: 0
158-
protectedContext: 0
159-
v2Signing: 0
160145
enable360StereoCapture: 0
161146
isWsaHolographicRemotingEnabled: 0
162147
enableFrameTimingStats: 0
@@ -169,8 +154,12 @@ PlayerSettings:
169154
androidMaxAspectRatio: 2.1
170155
applicationIdentifier:
171156
Android: com.Company.ProductName
157+
Standalone: com.UnityTechnologies.UnityEnvironment
172158
buildNumber:
159+
Standalone: 0
173160
iPhone: 0
161+
tvOS: 0
162+
overrideDefaultApplicationIdentifier: 0
174163
AndroidBundleVersionCode: 1
175164
AndroidMinSdkVersion: 19
176165
AndroidTargetSdkVersion: 0
@@ -187,10 +176,10 @@ PlayerSettings:
187176
StripUnusedMeshComponents: 0
188177
VertexChannelCompressionMask: 214
189178
iPhoneSdkVersion: 988
190-
iOSTargetOSVersionString: 10.0
179+
iOSTargetOSVersionString: 11.0
191180
tvOSSdkVersion: 0
192181
tvOSRequireExtendedGameController: 0
193-
tvOSTargetOSVersionString: 10.0
182+
tvOSTargetOSVersionString: 11.0
194183
uIPrerenderedIcon: 0
195184
uIRequiresPersistentWiFi: 0
196185
uIRequiresFullScreen: 1
@@ -224,8 +213,8 @@ PlayerSettings:
224213
iOSLaunchScreeniPadFillPct: 100
225214
iOSLaunchScreeniPadSize: 100
226215
iOSLaunchScreeniPadCustomXibPath:
227-
iOSUseLaunchScreenStoryboard: 0
228216
iOSLaunchScreenCustomStoryboardPath:
217+
iOSLaunchScreeniPadCustomStoryboardPath:
229218
iOSDeviceRequirements: []
230219
iOSURLSchemes: []
231220
iOSBackgroundModes: 0
@@ -243,10 +232,19 @@ PlayerSettings:
243232
iOSRequireARKit: 0
244233
iOSAutomaticallyDetectAndAddCapabilities: 1
245234
appleEnableProMotion: 0
235+
shaderPrecisionModel: 0
246236
clonedFromGUID: 00000000000000000000000000000000
247237
templatePackageId:
248238
templateDefaultScene:
239+
useCustomMainManifest: 0
240+
useCustomLauncherManifest: 0
241+
useCustomMainGradleTemplate: 0
242+
useCustomLauncherGradleManifest: 0
243+
useCustomBaseGradleTemplate: 0
244+
useCustomGradlePropertiesTemplate: 0
245+
useCustomProguardFile: 0
249246
AndroidTargetArchitectures: 5
247+
AndroidTargetDevices: 0
250248
AndroidSplashScreenScale: 0
251249
androidSplashScreen: {fileID: 0}
252250
AndroidKeystoreName:
@@ -263,6 +261,10 @@ PlayerSettings:
263261
height: 180
264262
banner: {fileID: 0}
265263
androidGamepadSupportLevel: 0
264+
chromeosInputEmulation: 1
265+
AndroidMinifyWithR8: 0
266+
AndroidMinifyRelease: 0
267+
AndroidMinifyDebug: 0
266268
AndroidValidateAppBundleSize: 1
267269
AndroidAppBundleSizeToValidate: 150
268270
m_BuildTargetIcons: []
@@ -306,6 +308,9 @@ PlayerSettings:
306308
- m_BuildTarget: MacStandaloneSupport
307309
m_APIs: 10000000
308310
m_Automatic: 0
311+
- m_BuildTarget: iOSSupport
312+
m_APIs: 10000000
313+
m_Automatic: 1
309314
m_BuildTargetVRSettings: []
310315
openGLRequireES31: 0
311316
openGLRequireES31AEP: 0
@@ -323,6 +328,7 @@ PlayerSettings:
323328
- m_BuildTarget: PS4
324329
m_EncodingQuality: 1
325330
m_BuildTargetGroupLightmapSettings: []
331+
m_BuildTargetNormalMapEncoding: []
326332
playModeTestRunnerEnabled: 0
327333
runPlayModeTestAsEditModeTest: 0
328334
actionOnDotNetUnhandledException: 1
@@ -332,12 +338,15 @@ PlayerSettings:
332338
cameraUsageDescription:
333339
locationUsageDescription:
334340
microphoneUsageDescription:
341+
bluetoothUsageDescription:
342+
switchNMETAOverride:
335343
switchNetLibKey:
336344
switchSocketMemoryPoolSize: 6144
337345
switchSocketAllocatorPoolSize: 128
338346
switchSocketConcurrencyLimit: 14
339347
switchScreenResolutionBehavior: 2
340348
switchUseCPUProfiler: 0
349+
switchUseGOLDLinker: 0
341350
switchApplicationID: 0x0005000C10000001
342351
switchNSODependencies:
343352
switchTitleNames_0:
@@ -355,6 +364,7 @@ PlayerSettings:
355364
switchTitleNames_12:
356365
switchTitleNames_13:
357366
switchTitleNames_14:
367+
switchTitleNames_15:
358368
switchPublisherNames_0:
359369
switchPublisherNames_1:
360370
switchPublisherNames_2:
@@ -370,6 +380,7 @@ PlayerSettings:
370380
switchPublisherNames_12:
371381
switchPublisherNames_13:
372382
switchPublisherNames_14:
383+
switchPublisherNames_15:
373384
switchIcons_0: {fileID: 0}
374385
switchIcons_1: {fileID: 0}
375386
switchIcons_2: {fileID: 0}
@@ -385,6 +396,7 @@ PlayerSettings:
385396
switchIcons_12: {fileID: 0}
386397
switchIcons_13: {fileID: 0}
387398
switchIcons_14: {fileID: 0}
399+
switchIcons_15: {fileID: 0}
388400
switchSmallIcons_0: {fileID: 0}
389401
switchSmallIcons_1: {fileID: 0}
390402
switchSmallIcons_2: {fileID: 0}
@@ -400,6 +412,7 @@ PlayerSettings:
400412
switchSmallIcons_12: {fileID: 0}
401413
switchSmallIcons_13: {fileID: 0}
402414
switchSmallIcons_14: {fileID: 0}
415+
switchSmallIcons_15: {fileID: 0}
403416
switchManualHTML:
404417
switchAccessibleURLs:
405418
switchLegalInformation:
@@ -462,6 +475,9 @@ PlayerSettings:
462475
switchSocketInitializeEnabled: 1
463476
switchNetworkInterfaceManagerInitializeEnabled: 1
464477
switchPlayerConnectionEnabled: 1
478+
switchUseNewStyleFilepaths: 0
479+
switchUseMicroSleepForYield: 1
480+
switchMicroSleepForYieldTime: 25
465481
ps4NPAgeRating: 12
466482
ps4NPTitleSecret:
467483
ps4NPTrophyPackPath:
@@ -532,6 +548,7 @@ PlayerSettings:
532548
ps4videoRecordingFeaturesUsed: 0
533549
ps4contentSearchFeaturesUsed: 0
534550
ps4CompatibilityPS5: 0
551+
ps4AllowPS5Detection: 0
535552
ps4GPU800MHz: 1
536553
ps4attribEyeToEyeDistanceSettingVR: 0
537554
ps4IncludedModules: []
@@ -552,9 +569,10 @@ PlayerSettings:
552569
webGLAnalyzeBuildSize: 0
553570
webGLUseEmbeddedResources: 0
554571
webGLCompressionFormat: 1
572+
webGLWasmArithmeticExceptions: 0
555573
webGLLinkerTarget: 1
556574
webGLThreadsSupport: 0
557-
webGLWasmStreaming: 0
575+
webGLDecompressionFallback: 0
558576
scriptingDefineSymbols:
559577
1:
560578
7: UNITY_POST_PROCESSING_STACK_V2
@@ -568,12 +586,17 @@ PlayerSettings:
568586
25: UNITY_POST_PROCESSING_STACK_V2
569587
26: UNITY_POST_PROCESSING_STACK_V2
570588
27: UNITY_POST_PROCESSING_STACK_V2
589+
additionalCompilerArguments: {}
571590
platformArchitecture: {}
572591
scriptingBackend: {}
573592
il2cppCompilerConfiguration: {}
574593
managedStrippingLevel: {}
575594
incrementalIl2cppBuild: {}
595+
suppressCommonWarnings: 1
576596
allowUnsafeCode: 0
597+
useDeterministicCompilation: 1
598+
useReferenceAssemblies: 1
599+
enableRoslynAnalyzers: 1
577600
additionalIl2CppArgs:
578601
scriptingRuntimeVersion: 1
579602
gcIncremental: 0
@@ -637,10 +660,7 @@ PlayerSettings:
637660
XboxOneXTitleMemory: 8
638661
XboxOneOverrideIdentityName:
639662
XboxOneOverrideIdentityPublisher:
640-
vrEditorSettings:
641-
daydream:
642-
daydreamIconForeground: {fileID: 0}
643-
daydreamIconBackground: {fileID: 0}
663+
vrEditorSettings: {}
644664
cloudServicesEnabled: {}
645665
luminIcon:
646666
m_Name:
@@ -654,11 +674,12 @@ PlayerSettings:
654674
m_VersionCode: 1
655675
m_VersionName:
656676
apiCompatibilityLevel: 3
677+
activeInputHandler: 2
657678
cloudProjectId:
658679
framebufferDepthMemorylessMode: 0
680+
qualitySettingsNames: []
659681
projectName:
660682
organizationId:
661683
cloudEnabled: 0
662-
enableNativePlatformBackendsForNewInputSystem: 1
663-
disableOldInputManagerSupport: 0
664684
legacyClampBlendShapeWeights: 1
685+
virtualTexturingSupportEnabled: 0

com.unity.ml-agents

Submodule com.unity.ml-agents updated 35 files

0 commit comments

Comments
 (0)