浏览代码

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

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

* removing os import
/MLA-1734-demo-provider
GitHub 4 年前
当前提交
1cac78e2
共有 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}")

正在加载...
取消
保存