You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using distributed or parallel set-up in script?: Neither
Using GPU in script?: No
GPU type: NVIDIA GeForce GTX 1060 6GB
Who can help?
No response
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
import numpy as np
from transformers.image_transforms import normalize
mock_img = np.random.rand(3, 10, 10)
# Simulating getting the std and mean from text
std = map(float, "1.5 0. 2.".split())
mean = map(float, "1.5 0. 2.".split())
# According to the doc, this setup should work, but it does not since "map" does not implement `len`
normalize(mock_img, std, mean)
Expected behavior
Use the Sequence type instead of Iterable to let users know that len needs to be implemented.
The text was updated successfully, but these errors were encountered:
Question: Am I following the right process to submit very small fix that do not impact the runtime (e.g. typing and documentations)? I noticed a few other mistypes while reading the code and I'd like to do it properly going forward.
Hi @CalOmnie, yes, this was good! For small fixes when the issue is clear, like bugs or obviously incorrect types, you can just submit a PR. We recommend opening an issue first when the change might be controversial or need discussion (for example, adding a whole new model class, or changing the behaviour of existing tools)
System Info
transformers
version: 4.49.0.dev0Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
Use the
Sequence
type instead of Iterable to let users know thatlen
needs to be implemented.The text was updated successfully, but these errors were encountered: