setting the new path , creating the new folder and

def log_path():
import offlinerl

log_path = os.path.abspath(os.path.join(offlinerl.__file__,"../../","offlinerl_tmp"))
    create_dir(log_path)

return log_path
def create_dir(dir_path, cover=False):

if cover or not os.path.exists(dir_path):
if cover and os.path.exists(dir_path):
os.removedirs(dir_path)
os.makedirs(dir_path)

dataset_dir = os.path.join(log_path(),"./offlinerl_datasets")
# this line code is equal to the next line code in python except in shell:
dataset_dir = os.path.join(log_path(),"offlinerl_datasets")

create_dir(dataset_dir)
posted @ 2022-04-23 18:01  呦呦南山  阅读(17)  评论(0编辑  收藏  举报