Skip to content

Conversation

aymeric-roucher
Copy link
Contributor

What does this PR do?

Deprecates transformers.agents in favor of smolagents for extended functionality, and a similar API.

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.

As mentioned on Slack (private link):

Fine for me to use these deprecation decorators from huggingface_hub even though they are private. Using private methods makes it more difficult to avoid breaking changes in huggingface_hub. For deprecation decorators it's perfectly fine as they are stable + only meant for a short period of time. That's more of an exception, let's not make a habit of it! 😄

@@ -720,6 +722,10 @@ class ReactAgent(Agent):
The action will be parsed from the LLM output: it consists in calls to tools from the toolbox, with arguments chosen by the LLM engine.
"""

@_deprecate_method(
version="4.51.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Only 1 release version in advance seems little to me but no strong opinion 🤷‍♂️

@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
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.

Thank you @aymeric-roucher!

@aymeric-roucher aymeric-roucher merged commit 9a217fc into main Feb 26, 2025
12 checks passed
@aymeric-roucher aymeric-roucher deleted the deprecate-transformers-agents branch February 26, 2025 10:38
@aymeric-roucher aymeric-roucher changed the title Add deprecation messages Deprecate transformers.agents Feb 26, 2025
@davidmezzetti
Copy link
Contributor

@aymeric-roucher This seems like a great idea! One snag though is that smolagents requires Python >= 3.10 but Transformers requires Python >= 3.9. So deprecating this doesn't give those that need Python == 3.9 a path to migrate.

Thoughts?

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.

5 participants