mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-07 04:39:07 +00:00
Windows build fix for on device training training. (#13354)
### Description This is a fix for on device training wheel build. ### Motivation and Context when building linux wheel it treats PathString same as std::string, but when trying to build the wheel on windows it fails because we needed to cast the std::string to a PathString. This error was found manually because there is no pipeline that uses the --enable_training_on_device for windows. Co-authored-by: Adam Louly <adamlouly@microsoft.com@orttrainingdev7.d32nl1ml4oruzj4qz3bqlggovf.px.internal.cloudapp.net>
This commit is contained in:
parent
ac5948cb48
commit
bed169192d
1 changed files with 1 additions and 1 deletions
|
|
@ -870,7 +870,7 @@ void addObjectMethodsForTraining(py::module& m, ExecutionProviderRegistrationFn
|
|||
checkpoint_state.def(py::init([](
|
||||
const std::string& ckpt_uri) {
|
||||
onnxruntime::training::api::CheckpointState state;
|
||||
ORT_THROW_IF_ERROR(onnxruntime::training::api::LoadCheckpoint(ckpt_uri, state));
|
||||
ORT_THROW_IF_ERROR(onnxruntime::training::api::LoadCheckpoint(ToPathString(ckpt_uri), state));
|
||||
return state;
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue