Skip to content

ZeroDivisionError in NotebookProgressBar #27513

@pete88b

Description

@pete88b

System Info

  • transformers version: 4.35.1
  • Platform: Windows-10-10.0.19041-SP0
  • Python version: 3.9.0
  • Huggingface_hub version: 0.17.3
  • Safetensors version: 0.3.1
  • Accelerate version: 0.20.3
  • Accelerate config: not found
  • PyTorch version (GPU?): 2.0.1+cu117 (True)
  • Tensorflow version (GPU?): not installed (NA)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Using GPU in script?: yes (GeForce 3080 laptop)
  • Using distributed or parallel set-up in script?: no

Who can help?

Hi @muellerzr - hope this is an easy one for you (o:

I'm sometimes seeing a divide by zero error when NotebookProgressBar updates.

I've suggested changes to transformers/utils/notebook.py in my notebook.

I'm guessing that for a change this simple, it'll be easier for you to make the change - but please let me know if you prefer I make a PR for this change

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

Please see my notebook

Expected behavior

We should not get a divide by zero error when average_time_per_item is zero

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions