浏览代码

[Bug-fix] Remove extra directory created at checkpoint (#4675) (#4678)

* [Bug-fix] Remove extra directory created at checkpoint

* removing os import
/release_10_branch
GitHub 4 年前
当前提交
fd31da37
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 4
      ml-agents/mlagents/trainers/torch/model_serialization.py

4
ml-agents/mlagents/trainers/torch/model_serialization.py


import os
import threading
from mlagents.torch_utils import torch

:param output_filepath: file path to output the model (without file suffix)
"""
if not os.path.exists(output_filepath):
os.makedirs(output_filepath)
onnx_output_path = f"{output_filepath}.onnx"
logger.info(f"Converting to {onnx_output_path}")

正在加载...
取消
保存