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

Minor typo in ImageClassificationPipeline #32030

Closed
2 of 4 tasks
moses opened this issue Jul 17, 2024 · 0 comments · Fixed by #32031
Closed
2 of 4 tasks

Minor typo in ImageClassificationPipeline #32030

moses opened this issue Jul 17, 2024 · 0 comments · Fixed by #32031
Labels

Comments

@moses
Copy link
Contributor

moses commented Jul 17, 2024

System Info

Issue is on HEAD on the main branch, been around for a while

Transformers env not really relevant, but for completeness:

  • transformers version: 4.32.1
  • Platform: macOS-14.5-arm64-arm-64bit
  • Python version: 3.11.5
  • Huggingface_hub version: 0.15.1
  • Safetensors version: 0.3.2
  • Accelerate version: not installed
  • Accelerate config: not found
  • PyTorch version (GPU?): 2.1.2 (False)
  • 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?:
  • Using distributed or parallel set-up in script?:

Who can help?

@Narsil There's a typo in ImageClassificationPipeline, that I don't believe usually has any effect, but it's confusing when reading the code. I will provide a PR with a fix.

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

This typo does not cause behavior change, because of the or self.model.config.num_labels == 1/> 1 condition.

Expected behavior

The problem_type condition should match the num_labels condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant