src/config_handler.py
def load_config(path):
    """ Load config file from local or remote locations.

    Args:
        path (str): This is the file-uri that indicates where
                          the YAML config should be loaded from.
        Examples:
            >>> path = "file:///root/config.yaml" # absolute path
            >>> path = "/root/config.yaml" # absolute path
            >>> path = "dev/config.yaml" # relative path

    Returns:
        config object of type yacs.config.CfgNode
    """
    logger.info(f"loading config from {path}")
    if path.startswith(const.LOCAL_FILE_BASE_STR):
        path = path[len(const.LOCAL_FILE_BASE_STR) :]
    if re.search(_REMOTE_PATTERN, path):
        # TODO: Implement remote GCS, S3, HTTP config backends
        raise NotImplementedError("Remote configs are not supported yet.")

    return CfgNode.load_cfg(open(path, "r"))
 Load config file from local or remote locations.

    Args:
        path (str): This is the file-uri that indicates where
                          the YAML config should be loaded from.
        Examples:
            >>> path = "file:///root/config.yaml" # absolute path
            >>> path = "/root/config.yaml" # absolute path
            >>> path = "dev/config.yaml" # relative path

    Returns:
        config object of type yacs.config.CfgNode
    
Load config file from local or remote locations.
Load config file from local or remote locations .
def load_config(path):
    logger.info(f"loading config from {path}")
    if path.startswith(const.LOCAL_FILE_BASE_STR):
        path = path[len(const.LOCAL_FILE_BASE_STR) :]
    if re.search(_REMOTE_PATTERN, path):
        raise NotImplementedError("Remote configs are not supported yet.")
    return CfgNode.load_cfg(open(path, "r"))
def load_config ( path ) : logger . info ( f"loading config from {path}" ) if path . startswith ( const . LOCAL_FILE_BASE_STR ) : path = path [ len ( const . LOCAL_FILE_BASE_STR ) : ] if re . search ( _REMOTE_PATTERN , path ) : raise NotImplementedError ( "Remote configs are not supported yet." ) return CfgNode . load_cfg ( open ( path , "r" ) )
Load config file from local or remote locations.
Load config file from local or remote locations .
""" Load config file from local or remote locations.

    Args:
        path (str): This is the file-uri that indicates where
                          the YAML config should be loaded from.
        Examples:
            >>> path = "file:///root/config.yaml" # absolute path
            >>> path = "/root/config.yaml" # absolute path
            >>> path = "dev/config.yaml" # relative path

    Returns:
        config object of type yacs.config.CfgNode
    """ # TODO: Implement remote GCS, S3, HTTP config backends
config object of type yacs.config.CfgNode
config object of type yacs . config . CfgNode
path
This is the file-uri that indicates where
the YAML config should be loaded from.
This is the file - uri that indicates where the YAML config should be loaded from .
Examples
None