Yotam-Perlitz commited on
Commit
9b33059
1 Parent(s): ebac596

add caching

Browse files

Signed-off-by: Yotam-Perlitz <y.perlitz@ibm.com>

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -136,7 +136,7 @@ def run_load(
136
  corr_types=["kendall"],
137
  n_exps=10,
138
  my_benchmark=Benchmark(),
139
- use_caching=False,
140
  ):
141
  # Create a hash of the inputs to generate a unique cache file for each set of inputs
142
  input_str = (
@@ -159,6 +159,7 @@ def run_load(
159
 
160
  # Define the cache directory
161
  cache_dir = "cache"
 
162
  cache_path = os.path.join(cache_dir, cache_file)
163
 
164
  # Check if the cache file exists
 
136
  corr_types=["kendall"],
137
  n_exps=10,
138
  my_benchmark=Benchmark(),
139
+ use_caching=True,
140
  ):
141
  # Create a hash of the inputs to generate a unique cache file for each set of inputs
142
  input_str = (
 
159
 
160
  # Define the cache directory
161
  cache_dir = "cache"
162
+ os.makedirs(cache_dir, exist_ok=True)
163
  cache_path = os.path.join(cache_dir, cache_file)
164
 
165
  # Check if the cache file exists