-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add scheduled confidence threshold within the ScheduledPseudoLabeler class #382
base: main
Are you sure you want to change the base?
Conversation
@@ -283,6 +283,7 @@ def load_model(checkpoint, model=None, name="best", state_key="model_state", dev | |||
ckpt = checkpoint | |||
|
|||
state = torch.load(ckpt, map_location=device)[state_key] | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check weights_only argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Marei33,
I had a quick look, and the overall design looks very good!
However, there is an issue with a test that seems to be caused by your changes:
ERROR: test_mean_teacher_unsupervised (self_training.test_mean_teacher.TestMeanTeacher.test_mean_teacher_unsupervised)
Could you check out why this fails?
You can run the test locally by going to test/self_training
and then running
python test_mean_teacher.py
@@ -235,6 +235,7 @@ def _train_epoch_unsupervised(self, progress, forward_context, backprop): | |||
) | |||
lr = [pm["lr"] for pm in self.optimizer.param_groups][0] | |||
self.logger.log_lr(self._iteration, lr) | |||
self.logger.log_ct(self._iteration, self.pseudo_labeler.confidence_threshold) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we need to check here that the confidence_threshold is not None before logging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I did exactly that. Now it only logs the threshold if it is not None.
test_mean_teacher.py should now be resolved |
No description provided.