model_analyzer/config/input/config_utils.py
def file_path_validator(path):
    """
    Perform some basic checks on strings passed in as paths.
    Used when the path is expected to exist, and Model Analyzer
    does not create the file at that path.

    Parameters
    ----------
    path: str
        Absolute path to a file or directory

    Returns
    -------
    ConfigStatus
    """

    abspath = os.path.abspath(path)

    if os.path.exists(abspath):
        return ConfigStatus(status=CONFIG_PARSER_SUCCESS)
    else:
        return ConfigStatus(
            status=CONFIG_PARSER_FAILURE,
            message=
            f"Either '{path}' is a nonexistent path, or Model Analyzer does "
            "not have permissions to execute os.stat on this path")

    Perform some basic checks on strings passed in as paths.
    Used when the path is expected to exist, and Model Analyzer
    does not create the file at that path.

    Parameters
    ----------
    path: str
        Absolute path to a file or directory

    Returns
    -------
    ConfigStatus
    
Perform some basic checks on strings passed in as paths.
Used when the path is expected to exist, and Model Analyzer
does not create the file at that path.

Parameters

str
Absolute path to a file or directory

Returns


Perform some basic checks on strings passed in as paths . Used when the path is expected to exist and Model Analyzer does not create the file at that path . Parameters str Absolute path to a file or directory Returns
def file_path_validator(path):
    abspath = os.path.abspath(path)
    if os.path.exists(abspath):
        return ConfigStatus(status=CONFIG_PARSER_SUCCESS)
    else:
        return ConfigStatus(
            status=CONFIG_PARSER_FAILURE,
            message=
            f"Either '{path}' is a nonexistent path, or Model Analyzer does "
            "not have permissions to execute os.stat on this path")
def file_path_validator ( path ) : abspath = os . path . abspath ( path ) if os . path . exists ( abspath ) : return ConfigStatus ( status = CONFIG_PARSER_SUCCESS ) else : return ConfigStatus ( status = CONFIG_PARSER_FAILURE , message = f"Either '{path}' is a nonexistent path, or Model Analyzer does " "not have permissions to execute os.stat on this path" )
Perform some basic checks on strings passed in as paths.
Perform some basic checks on strings passed in as paths .
"""
    Perform some basic checks on strings passed in as paths.
    Used when the path is expected to exist, and Model Analyzer
    does not create the file at that path.

    Parameters
    ----------
    path: str
        Absolute path to a file or directory

    Returns
    -------
    ConfigStatus
    """
path