close the validation dataset used in evaluate
@@ -164,6 +164,7 @@ def evaluate(config, restore_path, output_dir):
'metrics': {k: float(v) for k, v in zip(list(metrics_ops_dict.keys()), metrics_values)},
}
save_json(output_dir, json.dumps(metrics_dict, indent=4,), metrics_dict["last_step"])
+ validation_dataset.close()
@click.command(context_settings=dict(help_option_names=["-h", "--help"]))
