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

Revert "Modify label info comparison (#3442)" #3509

Merged
merged 1 commit into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/otx/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def test(
model_cls = self.model.__class__
model = model_cls.load_from_checkpoint(checkpoint_path=checkpoint)

if model.label_info.as_dict() != self.datamodule.label_info.as_dict():
if model.label_info != self.datamodule.label_info:
msg = (
"To launch a test pipeline, the label information should be same "
"between the training and testing datasets. "
Expand Down Expand Up @@ -452,7 +452,7 @@ def predict(
model_cls = self.model.__class__
model = model_cls.load_from_checkpoint(checkpoint_path=checkpoint)

if model.label_info.as_dict() != self.datamodule.label_info.as_dict():
if model.label_info != self.datamodule.label_info:
msg = (
"To launch a predict pipeline, the label information should be same "
"between the training and testing datasets. "
Expand Down Expand Up @@ -691,7 +691,7 @@ def explain(
model_cls = model.__class__
model = model_cls.load_from_checkpoint(checkpoint_path=checkpoint)

if model.label_info.as_dict() != self.datamodule.label_info.as_dict():
if model.label_info != self.datamodule.label_info:
msg = (
"To launch a explain pipeline, the label information should be same "
"between the training and testing datasets. "
Expand Down
Loading