Unverified Commit b3158fb0 authored by Tayo Oguntebi's avatar Tayo Oguntebi Committed by GitHub
Browse files

Explicitly allow for script execution from any directory. Make env vars...

Explicitly allow for script execution from any directory.  Make env vars visible in python script. (#6105)
parent 52622bf1
......@@ -6,6 +6,9 @@ if [ `id -u` != 0 ]; then
sudo echo "Success"
fi
SCRIPT_DIR=`dirname "$BASH_SOURCE"`
export PYTHONPATH="${SCRIPT_DIR}/../../"
DATASET="ml-20m"
BUCKET=${BUCKET:-""}
......@@ -33,7 +36,7 @@ else
fi
DATA_DIR="${ROOT_DIR}/movielens_data"
python ../datasets/movielens.py --data_dir ${DATA_DIR} --dataset ${DATASET}
python "${SCRIPT_DIR}/../datasets/movielens.py" --data_dir ${DATA_DIR} --dataset ${DATASET}
{
......@@ -55,7 +58,7 @@ do
# To reduce variation set the seed flag:
# --seed ${i}
python -u ncf_main.py \
python -u "${SCRIPT_DIR}/ncf_main.py" \
--model_dir ${MODEL_DIR} \
--data_dir ${DATA_DIR} \
--dataset ${DATASET} --hooks "" \
......
......@@ -2,8 +2,8 @@
set -e
# Example settings:
# TPU="taylorrobie-tpu-0"
# BUCKET="gs://taylorrobie-tpu-test-bucket-2"
# export TPU="taylorrobie-tpu-0"
# export BUCKET="gs://taylorrobie-tpu-test-bucket-2"
# Remove IDE "not assigned" warning highlights.
TPU=${TPU:-""}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment