-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fixing issue 1780 #1790
base: main
Are you sure you want to change the base?
fixing issue 1780 #1790
Conversation
@Lihanyiyi please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
@@ -148,7 +148,7 @@ def loss_fn(self, pred, label): | |||
def metric_fn(self, pred, label): | |||
mask = torch.isfinite(label) | |||
|
|||
if self.metric in ("", "loss"): | |||
if self.metric in ("", "loss","mse"): | |||
return -self.loss_fn(pred[mask], label[mask]) |
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.
You should use mse
instead of loss_fn
to support extending more losses in the future.
Description
Motivation and Context
How Has This Been Tested?
pytest qlib/tests/test_all_pipeline.py
under upper directory ofqlib
.Screenshots of Test Results (if appropriate):
Types of changes