From 04edbcfd0a233f72f9880705f496205afcb29860 Mon Sep 17 00:00:00 2001 From: Yu Chin Fabian Lim Date: Sun, 19 May 2024 06:34:27 +0000 Subject: [PATCH] dump out pip requirements for repro --- scripts/run_benchmarks.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh index 586a76af..758e2d9e 100644 --- a/scripts/run_benchmarks.sh +++ b/scripts/run_benchmarks.sh @@ -30,6 +30,9 @@ DATA_CACHE=data/cache.json # final result placed here BENCH_RESULT_FILE=benchmarks.csv +# freeze the pip requirements here +PIP_REQUIREMENTS_FILE=requirements.txt + # env inputs DRY_RUN=${DRY_RUN:-"false"} NO_DATA_PROCESSING=${NO_DATA_PROCESSING:-"false"} @@ -64,6 +67,7 @@ DEFAULTS_CONFIG=$WORKING_DIR/$DEFAULTS_CONFIG ACCELERATE_CONFIG=$WORKING_DIR/$ACCELERATE_CONFIG DATA_CACHE=$RESULT_DIR/$DATA_CACHE BENCH_RESULT_FILE=$RESULT_DIR/$BENCH_RESULT_FILE +PIP_REQUIREMENTS_FILE=$RESULT_DIR/$PIP_REQUIREMENTS_FILE # ------------- EXTRA ARGS ----------------- @@ -82,6 +86,9 @@ if [ "$NO_DATA_PROCESSING" = "true" ]; then EXTRA_ARGS="$EXTRA_ARGS --no_data_processing" fi +# dump out the environment +pip freeze > $PIP_REQUIREMENTS_FILE + # run the bench python $WORKING_DIR/benchmark.py \ --num_gpus $NUM_GPUS_MATRIX \