浏览代码
Merge pull request #4334 from Unity-Technologies/global-variables
Merge pull request #4334 from Unity-Technologies/global-variables
Adding rank to ml-agents/MLA-1734-demo-provider
GitHub
4 年前
当前提交
76deba36
共有 4 个文件被更改,包括 41 次插入 和 1 次删除
-
15ml-agents/mlagents/trainers/policy/tf_policy.py
-
6ml-agents/mlagents/trainers/stats.py
-
8ml-agents/mlagents/trainers/trainer_controller.py
-
13ml-agents/mlagents/tf_utils/globals.py
|
|||
from typing import Optional |
|||
|
|||
_rank: Optional[int] = None |
|||
|
|||
|
|||
def get_rank() -> Optional[int]: |
|||
""" |
|||
Returns the rank (in the MPI sense) of the current node. |
|||
For local training, this will always be None. |
|||
If this needs to be used, it should be done from outside ml-agents. |
|||
:return: |
|||
""" |
|||
return _rank |
撰写
预览
正在加载...
取消
保存
Reference in new issue