def get_model_meta(path):
model_path = ensure_path(path)<EOL>if not model_path.exists():<EOL><INDENT>raise IOError(Errors.E052.format(path=path2str(model_path)))<EOL><DEDENT>meta_path = model_path / "<STR_LIT>"<EOL>if not meta_path.is_file():<EOL><INDENT>raise IOError(Errors.E053.format(path=meta_path))<EOL><DEDENT>meta = srsly.read_json(meta_path)<EOL>for setting in ["<STR_LIT>", "<STR_LIT:name>", "<STR_LIT:version>"]:<EOL><INDENT>if setting not in meta or not meta[setting]:<EOL><INDENT>raise ValueError(Errors.E054.format(setting=setting))<EOL><DEDENT><DEDENT>return meta<EOL>
Get model meta.json from a directory path and validate its contents.

    path (unicode or Path): Path to model directory.
    RETURNS (dict): The model's meta data.