8000 [tune] get_checkpoint_paths fails due to glob command for .tune_metadata file · Issue #12453 · ray-project/ray · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[tune] get_checkpoint_paths fails due to glob command for .tune_metadata file #12453
Open
@juliusberner

Description

@juliusberner

TrainableUtil.get_checkpoints_paths does not recognize the .tune_metadata files due to the fact that glob.glob does not match files starting with ., see the end of the glob documentation.

metadata_file = glob.glob(
os.path.join(chkpt_dir, "*.tune_metadata"))
if len(metadata_file) != 1:
raise ValueError(
"{} has zero or more than one tune_metadata.".format(
chkpt_dir))

Possible solution: It seems that only .tune_metadata files are used throughout the library, so one could just omit glob.glob, e.g.

metadata_file = os.path.join(chkpt_dir, ".tune_metadata")
if not os.path.isfile(metadata_file):
     raise ValueError( 
         "{} has no tune_metadata.".format(chkpt_dir))

Ray version: 1.0.1.post1
Python version: 3.7.3 (issue should be independent of the python version)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issue, but not time-criticalbugSomething that is supposed to be working; but isn'tpending-cleanupThis issue is pending cleanup. It will be removed in 2 weeks after being assigned.tuneTune-related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0