From a67ab4c8d0a58022dcb9dc8b4607e0710a74024b Mon Sep 17 00:00:00 2001 From: or-toledano <49984106+or-toledano@users.noreply.github.com> Date: Mon, 14 Feb 2022 10:01:41 +0200 Subject: [PATCH] Make exp_with_args.sh agnostic to hard coded vars Automatic determination of the CodeT5 directory based on the parent of the directory the script resides in --- sh/exp_with_args.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh/exp_with_args.sh b/sh/exp_with_args.sh index 0e9c383..1fe408b 100644 --- a/sh/exp_with_args.sh +++ b/sh/exp_with_args.sh @@ -1,4 +1,5 @@ -WORKDIR="path_to_your_dir/CodeT5" +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +WORKDIR="${SCRIPT_DIR}/.." export PYTHONPATH=$WORKDIR TASK=${1}