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]: Workflow 'twoagents' is not among the defined enum values. #3037

Open
TheAmazingRoderic opened this issue Jun 28, 2024 · 8 comments
Open
Labels
bug Something isn't working studio Related to AutoGen Studio.

Comments

@TheAmazingRoderic
Copy link

Describe the bug

Autogenstudio v0.1.2 allows the upload of an older workflow that defines workflowtype as twoagents. This breaks the app's ability to retrieve existing workflows, displaying

"No workflows found. Please create a new workflow."

caused by

"ERROR | autogenstudio.database.dbmanager:get_items:128 - Error while getting items: Workflow 'twoagents' is not among the defined enum values. Enum name: workflowtype. Possible values: autonomous, sequential"

Additionally, deleting the workflow via the api fails with

{
"message": "Error while deleting: 'twoagents' is not among the defined enum values. Enum name: workflowtype. Possible values: autonomous, sequential",
"status": false,
"data": null
}

Steps to reproduce

1 - Download workflow from AutogenStudio 0.0.56rc9
2 - Upload workflow into AutogenStudio v0.1.2 via the UI
3 - System no longer displays any workflows
Screenshot 2024-06-28 at 10 59 17 AM
4 - Attempt to remove offending workflow fails due to invalid workflowtype
Screenshot 2024-06-28 at 11 02 21 AM

Model Used

gpt-4

Expected Behavior

Validation of workflowtype upon upload

Screenshots and logs

No response

Additional Information

No response

@TheAmazingRoderic TheAmazingRoderic added the bug Something isn't working label Jun 28, 2024
@victordibia
Copy link
Collaborator

victordibia commented Jun 28, 2024

Hi @TheAmazingRoderic ,

This error is due to an update in the db schema with v 0.1.0 +.
You can correct this by either deleting your current db, or running autogenstudio and pointing it to a new app folder

autogenstudio ui --appdir /path/to/folder

This will create a new db in the /path/to/folder using the right schema.

See docs FAQ on how to specify directory https://microsoft.github.io/autogen/docs/autogen-studio/faqs#q-how-do-i-specify-the-directory-where-fileseg-database-are-stored

@victordibia victordibia added the studio Related to AutoGen Studio. label Jun 28, 2024
@TheAmazingRoderic
Copy link
Author

Thank you @victordibia, I was able to repair the database. I reported because I believe it is a bug not to have the same validation/constraint of the schema applied on upload/insert into the database to prevent the situation.

@TheAmazingRoderic
Copy link
Author

I do see the TBD in the typescript:


And the commented code used previously:

It seems it would be nice to catch this in back at the the DBManager.upcert

@RafalSebastian
Copy link

I have created new db with --appdir instruction, and it allowed me to create one Workflow, but could assign only two agents (proxy and assistant). After that, ALL workflows gone.
image
image

@victordibia
Copy link
Collaborator

Hi @RafalSebastian ,

Work is being done to improve migration of data across versions, but not yet supported so workflows from previous versions will not be compatible with v 0.1.0 +.

With respect to multiple agents, the way to do that is to.

  • Under agents, create a new agent, select group chat, click create. Once this is created, you should see an agents tab. This should then let you add agents to the group chat. Finally, add a model to your group chat.
  • Under workflow, select your user proxy as sender and then your group chat agent as receiver.

@RafalSebastian
Copy link

Thank you Victor for the update. I do not worry much about the issues with migration of data across versions. The problem is I can't define any agent.
image
same for WIN and LINUX
I will carry experiments on previous versions until this issue is fixed. I do strongly regret that I can't contributre much but I truly appreciate everyones effort to make this project better.

@victordibia
Copy link
Collaborator

Any chance you can share the command line log that shows up when this error occurs? This will be helpful in debugging the issuel.
Eitherway, I'd recommend a fresh conda environment just to ensure there are no conflicts (e.g., version conflicts) and specify a new appdir (ensure the right version of the db is created).

@RafalSebastian
Copy link

Victor, the issue appears when trying to upload the previous version workflow json to the latest version of AutoGenStudio. As you said, it won't work and now I know why. Additionally it helped to create fresh conda env and new appdir (which wasn't necessary for clean installation).
New ui logic is far more better and "logical".
Thank you for your support Victor, very much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working studio Related to AutoGen Studio.
Projects
None yet
Development

No branches or pull requests

3 participants