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

Move loss metric to same device as inputs #3522

Merged
merged 1 commit into from
Aug 11, 2023
Merged

Conversation

Infernaught
Copy link
Contributor

Previously: evaluation loss metric could be on a different device than inputs

Now: evaluation loss metric moved to same device as inputs

eval_loss, additional_losses = self.eval_loss(targets, predictions)
self.eval_loss_metric = self.eval_loss_metric.to(target_device)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch! Could you also do this for self.eval_additional_losses_metrics? I assume that may also require being moved to the right device (once we support multi-feature outputs for LLM model types, but might as well do it now)

@github-actions
Copy link

Unit Test Results

  6 files  ±0    6 suites  ±0   58m 52s ⏱️ - 9m 31s
34 tests ±0  29 ✔️ ±0    5 💤 ±0  0 ±0 
88 runs  ±0  72 ✔️ ±0  16 💤 ±0  0 ±0 

Results for commit e39b015. ± Comparison against base commit 3a8d65e.

@arnavgarg1 arnavgarg1 merged commit f366f7c into master Aug 11, 2023
16 checks passed
@arnavgarg1 arnavgarg1 deleted the device-mapping branch August 11, 2023 21:40
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.

None yet

2 participants