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

CPU Support Minor Bug #59

Open
tedmoskovitz opened this issue Jun 9, 2023 · 0 comments
Open

CPU Support Minor Bug #59

tedmoskovitz opened this issue Jun 9, 2023 · 0 comments

Comments

@tedmoskovitz
Copy link

Hello, I believe I found a minor bug in IntentAccuracyDailyDialog, lines 672-3 in envs/text_generation/metric.py. The device is currently set with the following two lines:

self._device = "cuda" if torch.cuda.is_available() else "cpu"
self._device = f"cuda:{torch.cuda.device_count() - 1}"

However, I believe it should be such that the device is f"cuda:{torch.cuda.device_count() - 1}" if on GPU and "cpu" otherwise (as currently it can never be set to CPU, and instead tries to find "cuda:-1"). Thanks so much for putting this library together!

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

No branches or pull requests

1 participant