Skip to content

Commit 4810142

Browse files
author
lilong12
authored
fix the hange issue if checkpoint_dir is specified but not exists and update version to 0.1.1 (#27)
* modify error message * modify version to 0.1.1
1 parent 338eb99 commit 4810142

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

plsc/entry.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,12 @@ def load_checkpoint(self,
566566

567567
# Preporcess distributed parameters.
568568
file_name = os.path.join(checkpoint_dir, '.lock')
569+
meta_file = os.path.join(checkpoint_dir, 'meta.json')
570+
if not os.path.exists(meta_file):
571+
logger.error("Please make sure the checkpoint dir {} exists, and "
572+
"parameters in that dir are validating.".format(
573+
checkpoint_dir))
574+
exit()
569575
distributed = self.loss_type in ["dist_softmax", "dist_arcface"]
570576
if load_for_train and self.trainer_id == 0 and distributed:
571577
self.process_distributed_params(checkpoint_dir)

plsc/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
""" PLSC version string """
15-
plsc_version = "0.0.0"
15+
plsc_version = "0.1.1"

0 commit comments

Comments
 (0)