@@ -120,16 +120,18 @@ def get_capabilities_proto() -> UnityRLCapabilitiesProto:
120
120
return capabilities
121
121
122
122
@staticmethod
123
- def check_csharp_capabitlities (unity_package_ver : str , python_package_ver : str , caps : UnityRLCapabilitiesProto ):
123
+ def warn_csharp_base_capabitlities (
124
+ caps : UnityRLCapabilitiesProto , unity_package_ver : str , python_package_ver : str
125
+ ) -> None :
124
126
if not caps .BaseRLCapabilities :
125
- logger .warning ("WARNING: The Unity process is not running with the expected base Reinforcement Learning"
126
- " capabilities. Please be sure upgrade the Unity Package to a version that is compatible with this "
127
- "python package. \n "
128
- f"Python package version: { python_package_ver } , C# package version: { unity_package_ver } "
129
- f"Please find the versions that work best together from our release page. \n "
130
- "https://github.com/Unity-Technologies/ml-agents/releases" )
131
-
132
-
127
+ logger .warning (
128
+ "WARNING: The Unity process is not running with the expected base Reinforcement Learning "
129
+ " capabilities. Please be sure upgrade the Unity Package to a version that is compatible with this "
130
+ "python package. \n "
131
+ f"Python package version: { python_package_ver } , C# package version: { unity_package_ver } "
132
+ f"Please find the versions that work best together from our release page. \n "
133
+ "https://github.com/Unity-Technologies/ml-agents/releases"
134
+ )
133
135
134
136
def __init__ (
135
137
self ,
@@ -222,7 +224,11 @@ def __init__(
222
224
self ._close (0 )
223
225
UnityEnvironment ._raise_version_exception (aca_params .communication_version )
224
226
225
- UnityEnvironment .check_csharp_capabilities (aca_params .capabilities )
227
+ UnityEnvironment .warn_csharp_base_capabitlities (
228
+ aca_params .capabilities ,
229
+ aca_params .package_version ,
230
+ UnityEnvironment .API_VERSION ,
231
+ )
226
232
227
233
self ._env_state : Dict [str , Tuple [DecisionSteps , TerminalSteps ]] = {}
228
234
self ._env_specs : Dict [str , BehaviorSpec ] = {}
0 commit comments