To start the session, the previous PR updated the function such that a new model would be saved post modification
When saving this modified model, save_as_external_data was always set to True. For models which do not have external data, this would create new external data files and save them to the current running directory. This would cause the inference session to fail due to the location
Update the function to first check if the model has external data and only set save_as_external_data to be True if it does
Testing
Tested the failing models originally described in the ticket
Summary
save_as_external_data
was always set to True. For models which do not have external data, this would create new external data files and save them to the current running directory. This would cause the inference session to fail due to the locationsave_as_external_data
to be True if it doesTesting