+
Skip to content

Conversation

SammyOina
Copy link
Contributor

What type of PR is this?

This a feature as it adds a new failed state to agent

What does this do?

  • New Features

    • Enhanced error handling with the introduction of a new error for consumed results.
    • Added support for failure states in the computation process.
  • Improvements

    • Refined state machine logic to handle computation failures and transitions more effectively.
    • Improved clarity of comments and descriptions for better understanding of service behavior.

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

No

Did you document any new/modified feature?

Will update cocos docs

Notes

Signed-off-by: Sammy Oina <sammyoina@gmail.com>
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
@SammyOina SammyOina changed the title Cocos 181 COCOS-181 - Add failed state for algo execution Aug 9, 2024
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
Copy link
Contributor

@WashingtonKK WashingtonKK left a comment

Choose a reason for hiding this comment

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

@SammyOina
What do you think about this:

When a user attempts to fetch results before they are ready, return a warning that results are not ready and do not transition to the next state on the state machine.

Can this also be handled in this PR?

@SammyOina SammyOina requested a review from WashingtonKK August 15, 2024 12:57
@SammyOina
Copy link
Contributor Author

@SammyOina What do you think about this:

When a user attempts to fetch results before they are ready, return a warning that results are not ready and do not transition to the next state on the state machine.

Can this also be handled in this PR?

agent already returns results not ready warning. agent will not transition from running state unless results are ready or algo execution failed.

Copy link
Contributor

@WashingtonKK WashingtonKK left a comment

Choose a reason for hiding this comment

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

image

We have two indications of failed, I would say we only have:

Running -> Failed

And remove:

Failed -> failed

@SammyOina
Copy link
Contributor Author

image

We have two indications of failed, I would say we only have:

Running -> Failed

And remove:

Failed -> failed

Failed state exits for two reasons, one is for result consumers to see the reason for failed computation, another is to allow agent to remain in this state after running, it cannot remain in failed state perpetually. i.e running failed is not an actual state. agent state machine is still running. see https://github.com/SammyOina/cocos-ai/blob/cocos-181/agent/state.go

Copy link
Contributor

@WashingtonKK WashingtonKK left a comment

Choose a reason for hiding this comment

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

LGTM

@drasko drasko merged commit e4ef1aa into ultravioletrs:main Aug 20, 2024
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.

Feature: Transition to Different State on Failed Computation Run

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载