meg HF Staff commited on
Commit
180215e
·
verified ·
1 Parent(s): 306015c

Experimenting.

Browse files
Files changed (1) hide show
  1. entrypoint.sh +10 -15
entrypoint.sh CHANGED
@@ -16,11 +16,7 @@ python /parse_requests.py | while read line; do
16
  now=$(date +%Y-%m-%d-%H-%M-%S)
17
  export run_dir="./runs/" #${experiment_name}/${backend_model}/${now}"
18
 
19
- optimum-benchmark --config-name ${experiment_name} --config-dir /optimum-benchmark/examples/energy_star/ backend.model=${backend_model} backend.processor=${backend_model} hydra.run.dir=${run_dir} 2> $run_dir/error.log
20
-
21
- echo "Finished; uploading dataset results"
22
- python /create_results.py ./runs
23
-
24
  done || {
25
  echo "An error occurred while benchmarking the model..."
26
  echo "Using curl to retrieve the space run log."
@@ -29,18 +25,17 @@ done || {
29
  python /failed_run.py --run_dir $run_dir --model_name $backend_model --logs_name $logs_name
30
  }
31
 
32
- #if [ -s ./runs/logs-${now}.txt ]; then
33
- # # error.log is not-empty, an error was raised
34
- # echo "An error was raised while benchmarking the model..."
35
- # python /failed_run.py --run_dir $run_dir --model_name $backend_model
36
- #
37
  # # Delete the current run directory so that it is not pushed by create_results.py later
38
  # rm -rf $run_dir
39
- #else
40
- # # The file is empty, so no error
41
- # echo "Finished; uploading dataset results"
42
- # python /create_results.py ./runs
43
- #fi
44
 
45
  # Pausing space
46
  echo "Pausing space."
 
16
  now=$(date +%Y-%m-%d-%H-%M-%S)
17
  export run_dir="./runs/" #${experiment_name}/${backend_model}/${now}"
18
 
19
+ optimum-benchmark --config-name ${experiment_name} --config-dir /optimum-benchmark/examples/energy_star/ backend.model=${backend_model} backend.processor=${backend_model} hydra.run.dir=${run_dir} 2> $run_dir/error-${now}.log
 
 
 
 
20
  done || {
21
  echo "An error occurred while benchmarking the model..."
22
  echo "Using curl to retrieve the space run log."
 
25
  python /failed_run.py --run_dir $run_dir --model_name $backend_model --logs_name $logs_name
26
  }
27
 
28
+ if [ -s $run_dir/error-${now}.log ]; then
29
+ # error.log is not-empty, an error was raised
30
+ echo "An error was raised while benchmarking the model..."
31
+ python /failed_run.py --run_dir $run_dir --model_name $backend_model
 
32
  # # Delete the current run directory so that it is not pushed by create_results.py later
33
  # rm -rf $run_dir
34
+ else
35
+ # The file is empty, so no error
36
+ echo "Finished; uploading dataset results"
37
+ python /create_results.py ./runs
38
+ fi
39
 
40
  # Pausing space
41
  echo "Pausing space."