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)