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

Orca: Make loss_creator optional and discuss criterion when fit and eval #7168

Merged

Conversation

leonardozcm
Copy link
Contributor

@leonardozcm leonardozcm commented Jan 4, 2023

Description

When in predict mode, there should be no loss_creator. So we should require loss_creator when fiting or validating instead of init estimator.
#7161

@@ -304,6 +304,10 @@ def train_epoch(self,
self.train_loader.sampler.set_epoch(self.epochs)
self.logger.debug("Begin Training Step {}".format(self.epochs + 1))

if not self.criterion:
invalidInputError(False,
"You must provide a loss_creator.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Change the message to You must provide a loss for train and evaluate?

@hkvision
Copy link
Contributor

hkvision commented Jan 4, 2023

@sgwhat Take a look. After this PR merge, you can remove the arguments in your PR? #7166

@leonardozcm leonardozcm merged commit 35d8e4b into intel-analytics:main Jan 5, 2023
@leonardozcm leonardozcm deleted the fix-predict-require-loss branch January 5, 2023 07:19
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