diff --git a/collect_seed_metrics.py b/collect_seed_metrics.py index 74d7e42..b0f83b6 100644 --- a/collect_seed_metrics.py +++ b/collect_seed_metrics.py @@ -1,3 +1,11 @@ +import os + +CUR_FPATH = os.path.abspath(__file__) +CUR_FDIR = os.path.dirname(CUR_FPATH) + +# chdir to the directory of this script +os.chdir(CUR_FDIR) + import requests import numpy as np import json diff --git a/proxy_env2.py b/proxy_env2.py index 8e4d9c5..bbe2cea 100644 --- a/proxy_env2.py +++ b/proxy_env2.py @@ -1,3 +1,11 @@ +import os + +CUR_FPATH = os.path.abspath(__file__) +CUR_FDIR = os.path.dirname(CUR_FPATH) + +# chdir to the directory of this script +os.chdir(CUR_FDIR) + import requests import numpy as np import json diff --git a/run_different_req_freq.py b/run_different_req_freq.py index 6c5aa4c..43fde84 100644 --- a/run_different_req_freq.py +++ b/run_different_req_freq.py @@ -1,3 +1,11 @@ +import os + +CUR_FPATH = os.path.abspath(__file__) +CUR_FDIR = os.path.dirname(CUR_FPATH) + +# chdir to the directory of this script +os.chdir(CUR_FDIR) + req_freqs=["low","middle","high"] import threading diff --git a/run_multi_fn_dag.py b/run_multi_fn_dag.py index a95bb5f..9dacc9c 100644 --- a/run_multi_fn_dag.py +++ b/run_multi_fn_dag.py @@ -1,3 +1,12 @@ +import os + +CUR_FPATH = os.path.abspath(__file__) +CUR_FDIR = os.path.dirname(CUR_FPATH) + +# chdir to the directory of this script +os.chdir(CUR_FDIR) + + from proxy_env2 import ProxyEnv2 import threading dag_types = ["dag"] diff --git a/run_ppo.py b/run_ppo.py index 1403d33..9c25a89 100644 --- a/run_ppo.py +++ b/run_ppo.py @@ -19,6 +19,14 @@ From the paper "Proximal Policy Optimization Algorithms" https://arxiv.org/abs/1707.06347. """ +import os + +CUR_FPATH = os.path.abspath(__file__) +CUR_FDIR = os.path.dirname(CUR_FPATH) + +# chdir to the directory of this script +os.chdir(CUR_FDIR) + from proxy_env2 import ProxyEnv2 from deep_rl_zoo import greedy_actors from deep_rl_zoo import gym_env