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 tiktoken as a dependency in pyproject.toml #5008

Merged

Conversation

JohanForngren
Copy link
Contributor

@JohanForngren JohanForngren commented Jan 11, 2025

Why are these changes needed?

Adding missing dependency tiktoken.

Related issue number

Closes #5007

Checks

@victordibia
Copy link
Collaborator

victordibia commented Jan 11, 2025

Hi @JohanForngren ,

Thanks for this fix.
Now that I look at it, tiktoken should be installed with autogen_ext[openai] extra. I see that the dependencies have been separated and now we need to add an additional extra flag to that to ensure things install correctly ...

"autogen-ext[magentic-one, openai, azure]==0.4.0"

This will install dependencies that we do need in Studio . See here

azure = ["azure-core", "azure-identity"]
docker = ["docker~=7.0"]
openai = ["openai>=1.52.2", "tiktoken>=0.8.0", "aiofiles"]

Do you mind updating your fix to just modify the extras on autogen ext? ie this

"autogen-ext[magentic-one, openai, azure]==0.4.0"

Thanks again for testing and proposing this fix!
I'll merge in once updated

JohanForngren added a commit to JohanForngren/autogen that referenced this pull request Jan 13, 2025
JohanForngren added a commit to JohanForngren/autogen that referenced this pull request Jan 13, 2025
@JohanForngren JohanForngren force-pushed the bug-5007-missing-tiktoken-dependency branch from ef93f9e to b5ca6ad Compare January 13, 2025 09:45
JohanForngren added a commit to JohanForngren/autogen that referenced this pull request Jan 13, 2025
@JohanForngren JohanForngren force-pushed the bug-5007-missing-tiktoken-dependency branch from b5ca6ad to 312717f Compare January 13, 2025 10:19
@JohanForngren
Copy link
Contributor Author

@victordibia Thank you, I updated the fix and tested it to verify that it's working. The poe check is giving me errors, but it seems like the main branch is broken?

@microsoft-github-policy-service agree

@JohanForngren JohanForngren mentioned this pull request Jan 13, 2025
3 tasks
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.50%. Comparing base (c0082dd) to head (73f24eb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5008   +/-   ##
=======================================
  Coverage   68.50%   68.50%           
=======================================
  Files         156      156           
  Lines       10129    10129           
=======================================
  Hits         6939     6939           
  Misses       3190     3190           
Flag Coverage Δ
unittests 68.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jackgerrits jackgerrits added this to the 0.4.1 milestone Jan 13, 2025
Signed-off-by: Johan Forngren <[email protected]>

Update uv.lock with tiktoken dependency from fbfdc9f

Signed-off-by: Johan Forngren <[email protected]>
@JohanForngren JohanForngren force-pushed the bug-5007-missing-tiktoken-dependency branch from 312717f to 5b59430 Compare January 13, 2025 16:09
@victordibia victordibia self-requested a review January 13, 2025 17:50
@victordibia victordibia enabled auto-merge (squash) January 13, 2025 18:49
@victordibia victordibia merged commit 1a6e976 into microsoft:main Jan 13, 2025
62 checks passed
victordibia added a commit that referenced this pull request Jan 15, 2025
* Add tiktoken as a dependency in pyproject.toml

Signed-off-by: Johan Forngren <[email protected]>

Update uv.lock with tiktoken dependency from fbfdc9f

Signed-off-by: Johan Forngren <[email protected]>

* Updating autogen-ext dependencies per #5008 (comment)

Signed-off-by: Johan Forngren <[email protected]>

* PoC dev container

Signed-off-by: Johan Forngren <[email protected]>

* Enhance devcontainer setup with post-create script for dependency installation and improved performance. Removed partial hot reload setup, as it required bigger changes to the project. Improved documentation, and fixed markdown lint issues.

Signed-off-by: Johan Forngren <[email protected]>

* Update installation documentation for AutoGen Studio, clarifying installation methods and improving formatting. Adjusted notes for Windows users and corrected minor grammatical issues.

Signed-off-by: Johan Forngren <[email protected]>

* Fixing typos. Restructuring text to avoid consecutive markdown quote blocks separated only by a blank line to avoid MD028 - Blank line inside blockquote.

Signed-off-by: Johan Forngren <[email protected]>

* Include dev containers tutorial

Signed-off-by: Johan Forngren <[email protected]>

* Update dev container installation instructions

Signed-off-by: Johan Forngren <[email protected]>

---------

Signed-off-by: Johan Forngren <[email protected]>
Co-authored-by: Victor Dibia <[email protected]>
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.

Missing tiktoken dependency in AutoGen Studio
3 participants