Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Marei33
Copy link

@Marei33 Marei33 commented Oct 15, 2024

No description provided.

@@ -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]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check weights_only argument

Copy link
Owner

@constantinpape constantinpape left a 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)
Copy link
Owner

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?

Copy link
Author

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.

@Marei33
Copy link
Author

Marei33 commented Oct 16, 2024

test_mean_teacher.py should now be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants