Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn committed Jun 29, 2024
1 parent 6d23325 commit c912785
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions orttraining/orttraining/core/framework/checkpointing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "core/common/common.h"
#include "core/common/logging/logging.h"
#include "core/common/path.h"
#include "core/framework/data_transfer_utils.h"
#include "core/framework/endian_utils.h"
#include "core/framework/ort_value.h"
Expand Down Expand Up @@ -260,13 +259,11 @@ Status LoadModelCheckpoint(
ORT_RETURN_IF_ERROR(Env::Default().GetCanonicalPath(
checkpoint_path, checkpoint_canonical_path));

Path relative_tensors_data_path_obj{};
ORT_RETURN_IF_ERROR(RelativePath(
Path::Parse(model_directory_canonical_path),
Path::Parse(GetCheckpointTensorsDataFilePath(checkpoint_canonical_path)),
relative_tensors_data_path_obj));
Path relative_tensors_data_path_obj = std::filesystem::relative(
model_directory_canonical_path,
GetCheckpointTensorsDataFilePath(checkpoint_canonical_path));
ORT_RETURN_IF_ERROR(UpdateTensorsExternalDataLocations(
relative_tensors_data_path_obj.ToPathString(), loaded_tensor_protos));
relative_tensors_data_path_obj.native(), loaded_tensor_protos));
}

// read properties file
Expand Down

0 comments on commit c912785

Please sign in to comment.