Cleanup external data path validation
Merged
AD
8mo ago+283+283+012345678901234567890123456789-99-99-01234567890123456789
Description
- Updates the
ValidateExternalData()function:- Resolves symlinks when validating external data path for models loaded from memory.
- Previously only did a lexical check that did not resolve symlinks. Now, we resolve symlinks.
- Now requires external data path to exist.
- Replace the
(base_dir, model_dir)function parameters with justmodel_dir.base_dirwas always derived frommodel_dir. - Skip validation for WASM builds that do not have a filesystem.
- Return
Statusinstead of throwing exceptions whenstd::filesystemfunctions fail.
- Resolves symlinks when validating external data path for models loaded from memory.
- Updates
Graph::ConvertInitializersIntoOrtValues():- Prevents unnecessary calls to
ValidateExternalData()for external data paths that have already been validated.
- Prevents unnecessary calls to