Skip to content

Commit

Permalink
fix the hange issue if checkpoint_dir is specified but not exists and…
Browse files Browse the repository at this point in the history
… update version to 0.1.1 (#27)

* modify error message

* modify version to 0.1.1
  • Loading branch information
lilong12 authored Jan 9, 2020
1 parent 338eb99 commit 4810142
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions plsc/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,12 @@ def load_checkpoint(self,

# Preporcess distributed parameters.
file_name = os.path.join(checkpoint_dir, '.lock')
meta_file = os.path.join(checkpoint_dir, 'meta.json')
if not os.path.exists(meta_file):
logger.error("Please make sure the checkpoint dir {} exists, and "
"parameters in that dir are validating.".format(
checkpoint_dir))
exit()
distributed = self.loss_type in ["dist_softmax", "dist_arcface"]
if load_for_train and self.trainer_id == 0 and distributed:
self.process_distributed_params(checkpoint_dir)
Expand Down
2 changes: 1 addition & 1 deletion plsc/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
""" PLSC version string """
plsc_version = "0.0.0"
plsc_version = "0.1.1"

0 comments on commit 4810142

Please sign in to comment.