meg HF staff commited on
Commit
07f5bdd
·
verified ·
1 Parent(s): 180215e

Experimenting.

Browse files
Files changed (1) hide show
  1. entrypoint.sh +6 -5
entrypoint.sh CHANGED
@@ -18,11 +18,12 @@ python /parse_requests.py | while read line; do
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."
23
- logs_name=./runs/logs-${now}.txt
24
- curl https://api.hf.space/v1/${SPACE}/logs/run -H "Authorization: Bearer ${DEBUG}" > ${logs_name}
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
 
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 "Error."
22
+ # TODO: Although this works, `curl` appears to run indefinitely because it is recording itself (the logs are recording the curl operation.)
23
+ #echo "Using curl to retrieve the space run log."
24
+ #logs_name=./runs/logs-${now}.txt
25
+ #curl https://api.hf.space/v1/${SPACE}/logs/run -H "Authorization: Bearer ${DEBUG}" > ${logs_name}
26
+ #python /failed_run.py --run_dir $run_dir --model_name $backend_model --logs_name $logs_name
27
  }
28
 
29
  if [ -s $run_dir/error-${now}.log ]; then