loghugging25 commited on
Commit
fcecfa3
·
1 Parent(s): 8f99c19

app.py: xplicitly checks for the DASHBOARD_FROM_RESULTS_DIR environment variable when from_results_dir is None, ensuring the correct directory is used even if Click's auto_envvar_prefix mechanism isn't working as expected.

Browse files
Files changed (1) hide show
  1. dashboard/app.py +5 -0
dashboard/app.py CHANGED
@@ -216,6 +216,11 @@ def run(from_results_dir, datasource, port):
216
  @click.option('--datasource', default='file://benchmarks.parquet', help='Load a Parquet file already generated')
217
  @click.option('--port', default=7860, help='Port to run the dashboard')
218
  def main(from_results_dir, datasource, port):
 
 
 
 
 
219
  run(from_results_dir, datasource, port)
220
 
221
 
 
216
  @click.option('--datasource', default='file://benchmarks.parquet', help='Load a Parquet file already generated')
217
  @click.option('--port', default=7860, help='Port to run the dashboard')
218
  def main(from_results_dir, datasource, port):
219
+ # Explicitly check for environment variable if from_results_dir is None
220
+ if from_results_dir is None and 'DASHBOARD_FROM_RESULTS_DIR' in os.environ:
221
+ from_results_dir = os.environ.get('DASHBOARD_FROM_RESULTS_DIR')
222
+ print(f"Using environment variable: DASHBOARD_FROM_RESULTS_DIR={from_results_dir}")
223
+
224
  run(from_results_dir, datasource, port)
225
 
226