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

[Bug]: Autogen Studio Api Version cannot be saved #1126

Closed
Cloudinfo-Github opened this issue Jan 3, 2024 · 9 comments
Closed

[Bug]: Autogen Studio Api Version cannot be saved #1126

Cloudinfo-Github opened this issue Jan 3, 2024 · 9 comments

Comments

@Cloudinfo-Github
Copy link

Describe the bug

After setting the api version in the model, the api version will disappear when you re-enter the model settings.
Later, when using the gpt-4 model of Azure openai, there will be a problem of resource not being found.

Steps to reproduce

No response

Expected Behavior

No response

Screenshots and logs

image
image

Additional Information

No response

@rickyloynd-microsoft
Copy link
Contributor

@victordibia

@victordibia
Copy link
Collaborator

Hi @Cloudinfo-Github ,

Thanks for noting this. It is indeed a bug and a fix has been pushed (still being tested) to pypi (0.0.19a)

pip install -U autogenstudio

Please try it out and let me know.

@Cloudinfo-Github
Copy link
Author

Hi @victordibia ,

Thanks for your help, I have installed a new version of the package, but when I open autogen studio, an error message pops up.

image

The api version can be saved normally, but other error messages will pop up later in the playground.

image

@victordibia
Copy link
Collaborator

Thanks for noting. Looks like a db issue.
Investigating.

@victordibia
Copy link
Collaborator

victordibia commented Jan 3, 2024

@@Cloudinfo-Github
Can you confirm if you did your pip install in a fresh environment?
If not, can you try creating a new environment and running pip install (the goal is to reload the database)

@amihalik
Copy link
Contributor

amihalik commented Jan 3, 2024

I'm running into a "typing" issue with 0.0.19a.

I'm starting with a clean container:

docker run -it --rm -p 8081:8081 python:3.10.13-bullseye bash -c "pip install autogenstudio==0.0.19a && autogenstudio ui --host 0.0.0.0 --port 8081"

and I run into this:

Traceback (most recent call last):

  File "/usr/local/bin/autogenstudio", line 8, in <module>
    sys.exit(run())

  File "/usr/local/lib/python3.10/site-packages/autogenstudio/cli.py", line 44, in run
    app()

  File "/usr/local/lib/python3.10/site-packages/autogenstudio/cli.py", line 25, in ui
    uvicorn.run(

  File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 587, in run
    server.run()

  File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 61, in run
    return asyncio.run(self.serve(sockets=sockets))

  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)

  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()

  File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in serve
    config.load()

  File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 467, in load
    self.loaded_app = import_from_string(self.app)

  File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
    module = importlib.import_module(module_str)

  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import

  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load

  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked

  File "<frozen importlib._bootstrap_external>", line 883, in exec_module

  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed

  File "/usr/local/lib/python3.10/site-packages/autogenstudio/web/app.py", line 53, in <module>
    dbmanager = DBManager(path=db_path)  # manage database operations

  File "/usr/local/lib/python3.10/site-packages/autogenstudio/utils/dbutils.py", line 109, in __init__
    self.init_db(path=self.path, **kwargs)

  File "/usr/local/lib/python3.10/site-packages/autogenstudio/utils/dbutils.py", line 190, in init_db
    workflow = AgentWorkFlowConfig(**workflow)

  File "/usr/local/lib/python3.10/site-packages/pydantic/_internal/_dataclasses.py", line 134, in __init__
    s.__pydantic_validator__.validate_python(ArgsKwargs(args, kwargs), self_instance=s)

  File "/usr/local/lib/python3.10/site-packages/pydantic/_internal/_dataclasses.py", line 134, in __init__
    s.__pydantic_validator__.validate_python(ArgsKwargs(args, kwargs), self_instance=s)

  File "/usr/local/lib/python3.10/typing.py", line 955, in __call__
    raise TypeError(f"Type {self._name} cannot be instantiated; "

TypeError: Type List cannot be instantiated; use list() instead

This works fine:

docker run -it --rm -p 8081:8081 python:3.10.13-bullseye bash -c "pip install autogenstudio==0.0.18a && autogenstudio ui --host 0.0.0.0 --port 8081"

@victordibia
Copy link
Collaborator

@amihalik ,

I was able to replicate the bug you mentioned. I have pushed an update v0.0.21a which should resolve the typing issue.

@Cloudinfo-Github

pip install -U autogenstudio

@Cloudinfo-Github
Copy link
Author

Hi @victordibia ,

I have tested and the error has been resolved, thank you very much

@victordibia
Copy link
Collaborator

victordibia commented Jan 4, 2024 via email

whiskyboy pushed a commit to whiskyboy/autogen that referenced this issue Apr 17, 2024
* first commit

* second update

* third update

---------

Co-authored-by: “xiaoboxia” <“xiaoboxia.uni@gmail.com”>
Co-authored-by: Shaokun <shaokunzhang529@gmail.com>
Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
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

No branches or pull requests

4 participants