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

Add semantic script, trainer #16834

Merged
merged 7 commits into from
Apr 27, 2022

Conversation

NielsRogge
Copy link
Contributor

@NielsRogge NielsRogge commented Apr 19, 2022

What does this PR do?

This PR adds run_semantic_segmentation.py, which leverages the Trainer API for fine-tuning any model supported by AutoModelForSemanticSegmentation.

To do:

  • fix WandB logging, which doesn't seem to like the fact that metrics are turned into lists. Might need some help here from @sgugger.
  • also wondering why the model card doesn't include the dataset name (even though it has a default value in the script):

Screenshot 2022-04-19 at 16 19 22

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 19, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this! It's not just Wandb, all loggers will complain about lists in metric values, so you should find a way to given them keys (at worst convert the list into a dict with {i: v for i, vin enumerate(list_to_convert)}).

Not sure where the dataset name is replaced by None, but normally it should be passed along to the model card.

@NielsRogge NielsRogge force-pushed the add_semantic_script_trainer branch from 2daf0c4 to 6792356 Compare April 19, 2022 20:25
@NielsRogge NielsRogge merged commit 479fdc4 into huggingface:main Apr 27, 2022
chamidullinr pushed a commit to chamidullinr/transformers that referenced this pull request Apr 28, 2022
* Add first draft

* Improve script and README

* Improve README

* Apply suggestions from code review

* Improve script, add link to resulting model

* Add corresponding test

* Adjust learning rate
elusenji pushed a commit to elusenji/transformers that referenced this pull request Jun 12, 2022
* Add first draft

* Improve script and README

* Improve README

* Apply suggestions from code review

* Improve script, add link to resulting model

* Add corresponding test

* Adjust learning rate
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

Successfully merging this pull request may close these issues.

3 participants