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

ZeroDivisionError: float division by zero samples_per_second = num_samples / runtime #105

Open
Johnsd11 opened this issue Dec 15, 2022 · 1 comment

Comments

@Johnsd11
Copy link

File "C:\tools\Anaconda3\envs\cnlpt5\lib\site-packages\transformers\trainer_utils.py", line 347, in speed_metrics
samples_per_second = num_samples / runtime
ZeroDivisionError: float division by zero

It looks like time.time() gives seconds, so it's possible to get runtime = 0 "runtime = time.time() - start_time"

Thanks,
Dennis & Sean

@angus-lherrou
Copy link
Collaborator

Hi Dennis, could you post the full traceback?

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

2 participants