uot;No checkpoints have been found for trial: &quot;</span> <span class="o">+</span> <span class="n">trial_dir</span><span class="p">)</span>
      <span class="k">return</span>

    <span class="n">a</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span> <span class="k">if</span> <span class="n">mode</span> <span class="o">==</span> <span class="s2">&quot;max&quot;</span> <span class="k">else</span> <span class="mi">1</span>
    <span class="n">best_path_metrics</span> <span clas