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 __init__.py for capabilities #1177

Merged
merged 3 commits into from
Jan 8, 2024
Merged

add __init__.py for capabilities #1177

merged 3 commits into from
Jan 8, 2024

Conversation

btcioner
Copy link
Contributor

@btcioner btcioner commented Jan 8, 2024

Why are these changes needed?

some error info like below:

ModuleNotFoundError Traceback (most recent call last)
in <cell line: 3>()
1 import autogen
2 from autogen import UserProxyAgent, config_list_from_json
----> 3 from autogen.agentchat.contrib.capabilities.teachability import Teachability
4 from flaml import tune
5

ModuleNotFoundError: No module named 'autogen.agentchat.contrib.capabilities'

Related issue number

Checks

@rickyloynd-microsoft
Copy link
Contributor

Looks reasonable to me. @sonichi it appears that agentchat/contrib/__init__.py is empty. Is this intentional?

Copy link
Contributor

@rickyloynd-microsoft rickyloynd-microsoft left a comment

Choose a reason for hiding this comment

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

I've verified that the contrib/capabilities folder is missing from the pyautogen==0.2.4 package, and adding the folder manually under site-packages after a pip install fixes the problem. I assume that adding an __init__.py file per this PR will cause the package build process to pick up the capabilities folder. I also verified that the contents of __init__.py supplied by this PR allow Teachability and AgentCapability to be imported and run, although an empty __init__.py also seems to work.

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (78a2d84) 31.80% compared to head (f764fe6) 39.52%.

Files Patch % Lines
autogen/agentchat/contrib/capabilities/__init__.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1177      +/-   ##
==========================================
+ Coverage   31.80%   39.52%   +7.71%     
==========================================
  Files          29       32       +3     
  Lines        4112     4301     +189     
  Branches      961     1044      +83     
==========================================
+ Hits         1308     1700     +392     
+ Misses       2710     2475     -235     
- Partials       94      126      +32     
Flag Coverage Δ
unittests 39.45% <0.00%> (+7.69%) ⬆️

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.

@rickyloynd-microsoft
Copy link
Contributor

rickyloynd-microsoft commented Jan 8, 2024

@btcioner The pre-commit-check fails because black wants the list to be on a single line like this:

__all__ = ["Teachability", "AgentCapability"]

Can you make this change in your fork? Thanks.

Fix formatting to satisfy black.
@rickyloynd-microsoft
Copy link
Contributor

rickyloynd-microsoft commented Jan 8, 2024

@btcioner The pre-commit-check fails because black wants the list to be on a single line like this:

__all__ = ["Teachability", "AgentCapability"]

Can you make this change in your fork? Thanks.

Oh, it looks like I've got access to your fork. I went ahead and made the change. Now pre-commit-check is happy!

@sonichi sonichi added this pull request to the merge queue Jan 8, 2024
Merged via the queue into microsoft:main with commit 5a72591 Jan 8, 2024
76 of 84 checks passed
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* Make auto reply method pluggable

* allow richer trigger types

* test list
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* Create __init__.py

* Update __init__.py

* Update __init__.py

Fix formatting to satisfy black.

---------

Co-authored-by: Ricky Loynd <[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.

4 participants