浏览代码
Hotfixes for Release 0.15.1 (#3698)
Hotfixes for Release 0.15.1 (#3698)
* [bug-fix] Increase height of wall in CrawlerStatic (#3650) * [bug-fix] Improve performance for PPO with continuous actions (#3662) * Corrected a typo in a name of a function (#3670) OnEpsiodeBegin was corrected to OnEpisodeBegin in Migrating.md document * Add Academy.AutomaticSteppingEnabled to migration (#3666) * Fix editor port in Dockerfile (#3674) * Hotfix memory leak on Python (#3664) * Hotfix memory leak on Python * Fixing * Fixing a bug in the heuristic policy. A decision should not be requested when the agent is done * [bug-fix] Make Python able to deal with 0-step episodes (#3671) * adding some comments Co-authored-by: Ervin T <ervin@unity3d.com> * Remove vis_encode_type from list of required (#3677) * Update changelog (#3678) * Shorten timeout duration for environment close (#3679) The timeout duration for closing an environment was set to the same duration as the timeout when waiting .../release-0.15.1
GitHub
5 年前
当前提交
ec278616
共有 45 个文件被更改,包括 320 次插入 和 147 次删除
-
2.pylintrc
-
6Dockerfile
-
13Project/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab
-
3README.md
-
11com.unity.ml-agents/CHANGELOG.md
-
2com.unity.ml-agents/Runtime/Academy.cs
-
3com.unity.ml-agents/Runtime/Agent.cs
-
17com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs
-
5com.unity.ml-agents/Runtime/Policies/HeuristicPolicy.cs
-
2com.unity.ml-agents/package.json
-
4docs/Migrating.md
-
2gym-unity/gym_unity/__init__.py
-
32gym-unity/gym_unity/envs/__init__.py
-
48gym-unity/gym_unity/tests/test_gym.py
-
2ml-agents-envs/mlagents_envs/__init__.py
-
23ml-agents-envs/mlagents_envs/environment.py
-
4ml-agents-envs/mlagents_envs/side_channel/outgoing_message.py
-
4ml-agents-envs/mlagents_envs/side_channel/side_channel.py
-
5ml-agents/mlagents/model_serialization.py
-
2ml-agents/mlagents/trainers/__init__.py
-
31ml-agents/mlagents/trainers/agent_processor.py
-
5ml-agents/mlagents/trainers/components/reward_signals/__init__.py
-
4ml-agents/mlagents/trainers/curriculum.py
-
38ml-agents/mlagents/trainers/distributions.py
-
5ml-agents/mlagents/trainers/env_manager.py
-
5ml-agents/mlagents/trainers/ghost/trainer.py
-
19ml-agents/mlagents/trainers/learn.py
-
4ml-agents/mlagents/trainers/meta_curriculum.py
-
1ml-agents/mlagents/trainers/policy/nn_policy.py
-
23ml-agents/mlagents/trainers/policy/tf_policy.py
-
4ml-agents/mlagents/trainers/ppo/trainer.py
-
5ml-agents/mlagents/trainers/sac/optimizer.py
-
6ml-agents/mlagents/trainers/sac/trainer.py
-
7ml-agents/mlagents/trainers/stats.py
-
5ml-agents/mlagents/trainers/subprocess_env_manager.py
-
2ml-agents/mlagents/trainers/tests/simple_test_envs.py
-
9ml-agents/mlagents/trainers/tests/test_agent_processor.py
-
10ml-agents/mlagents/trainers/tests/test_distributions.py
-
23ml-agents/mlagents/trainers/tests/test_simple_rl.py
-
5ml-agents/mlagents/trainers/trainer/trainer.py
-
4ml-agents/mlagents/trainers/trainer_controller.py
-
5ml-agents/mlagents/trainers/trainer_util.py
-
1setup.cfg
-
46ml-agents-envs/mlagents_envs/logging_util.py
-
10ml-agents/mlagents/logging_util.py
|
|||
__version__ = "0.15.0" |
|||
__version__ = "0.15.1" |
|
|||
__version__ = "0.15.0" |
|||
__version__ = "0.15.1" |
|
|||
__version__ = "0.15.0" |
|||
__version__ = "0.15.1" |
|
|||
import logging # noqa I251 |
|||
|
|||
CRITICAL = logging.CRITICAL |
|||
FATAL = logging.FATAL |
|||
ERROR = logging.ERROR |
|||
WARNING = logging.WARNING |
|||
INFO = logging.INFO |
|||
DEBUG = logging.DEBUG |
|||
NOTSET = logging.NOTSET |
|||
|
|||
_loggers = set() |
|||
_log_level = NOTSET |
|||
DATE_FORMAT = "%Y-%m-%d %H:%M:%S" |
|||
LOG_FORMAT = "%(asctime)s %(levelname)s [%(filename)s:%(lineno)d] %(message)s" |
|||
|
|||
|
|||
def get_logger(name: str) -> logging.Logger: |
|||
""" |
|||
Create a logger with the specified name. The logger will use the log level |
|||
specified by set_log_level() |
|||
""" |
|||
logger = logging.getLogger(name=name) |
|||
|
|||
# If we've already set the log level, make sure new loggers use it |
|||
if _log_level != NOTSET: |
|||
logger.setLevel(_log_level) |
|||
|
|||
# Keep track of this logger so that we can change the log level later |
|||
_loggers.add(logger) |
|||
return logger |
|||
|
|||
|
|||
def set_log_level(log_level: int) -> None: |
|||
""" |
|||
Set the ML-Agents logging level. This will also configure the logging format (if it hasn't already been set). |
|||
""" |
|||
global _log_level |
|||
_log_level = log_level |
|||
|
|||
# Configure the log format. |
|||
# In theory, this would be sufficient, but if another library calls logging.basicConfig |
|||
# first, it doesn't have any effect. |
|||
logging.basicConfig(level=_log_level, format=LOG_FORMAT, datefmt=DATE_FORMAT) |
|||
|
|||
for logger in _loggers: |
|||
logger.setLevel(log_level) |
|
|||
import logging |
|||
|
|||
|
|||
def create_logger(name, log_level): |
|||
date_format = "%Y-%m-%d %H:%M:%S" |
|||
log_format = "%(asctime)s %(levelname)s [%(filename)s:%(lineno)d] %(message)s" |
|||
|
|||
logging.basicConfig(level=log_level, format=log_format, datefmt=date_format) |
|||
logger = logging.getLogger(name=name) |
|||
return logger |
撰写
预览
正在加载...
取消
保存
Reference in new issue