Skip to content

Un-deprecate timeout arg in pipelines#34382

Merged
Rocketknight1 merged 3 commits intomainfrom
un_deprecate_timeout
Oct 29, 2024
Merged

Un-deprecate timeout arg in pipelines#34382
Rocketknight1 merged 3 commits intomainfrom
un_deprecate_timeout

Conversation

@Rocketknight1
Copy link
Member

@Rocketknight1 Rocketknight1 commented Oct 24, 2024

As part of the pipeline sync project, this PR allows some arguments in transformers that don't have to be in the Hub spec. This is limited to arguments that do not actually affect the core pipeline, like timeout, which controls the timeout for downloading images passed as path arguments.

@Rocketknight1
Copy link
Member Author

cc @LysandreJik @Wauplin for review!

@Rocketknight1 Rocketknight1 changed the title Un deprecate timeout Un-deprecate timeout arg in pipelines Oct 24, 2024
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Thanks @Rocketknight1! Looks good. Let's wait for another review though



def compare_pipeline_args_to_hub_spec(pipeline_class, hub_spec):
ALLOWED_TRANSFORMERS_ONLY_ARGS = ["timeout"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe over-engineering things here but I would make this list pipeline-specific

Copy link
Contributor

Choose a reason for hiding this comment

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

(feel free to ignore though, we can also do it next time a "transformers"-only arg is added)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it shouldn't be too painful to make that change when we need to!

@Wauplin
Copy link
Contributor

Wauplin commented Oct 25, 2024

(x-linking #34290 (comment) where this PR was discussed)

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Yes! Thanks @Rocketknight1

@Rocketknight1 Rocketknight1 merged commit 9bee9ff into main Oct 29, 2024
@Rocketknight1 Rocketknight1 deleted the un_deprecate_timeout branch October 29, 2024 18:45
BernardZach pushed a commit to BernardZach/transformers that referenced this pull request Dec 5, 2024
* Un-deprecate timeout

* Put "timeout" on the allowed list

* make fixup
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.

4 participants