Improve code quality
This commit is contained in:
parent
5769b9244f
commit
6e70ae6e95
@ -86,7 +86,6 @@ def start_hyperopt_show(args: Dict[str, Any]) -> None:
|
|||||||
config['user_data_dir'] / 'hyperopt_results',
|
config['user_data_dir'] / 'hyperopt_results',
|
||||||
config.get('hyperoptexportfilename'))
|
config.get('hyperoptexportfilename'))
|
||||||
|
|
||||||
|
|
||||||
n = config.get('hyperopt_show_index', -1)
|
n = config.get('hyperopt_show_index', -1)
|
||||||
|
|
||||||
filteroptions = {
|
filteroptions = {
|
||||||
|
@ -91,7 +91,8 @@ def get_latest_hyperopt_file(directory: Union[Path, str], predef_filename: str =
|
|||||||
* `directory/.last_result.json` does not exist
|
* `directory/.last_result.json` does not exist
|
||||||
* `directory/.last_result.json` has the wrong content
|
* `directory/.last_result.json` has the wrong content
|
||||||
"""
|
"""
|
||||||
|
if isinstance(directory, str):
|
||||||
|
directory = Path(directory)
|
||||||
if predef_filename:
|
if predef_filename:
|
||||||
return directory / predef_filename
|
return directory / predef_filename
|
||||||
return directory / get_latest_hyperopt_filename(directory)
|
return directory / get_latest_hyperopt_filename(directory)
|
||||||
|
Loading…
Reference in New Issue
Block a user