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

handle different events #69

Merged
merged 6 commits into from
May 6, 2024
Merged

handle different events #69

merged 6 commits into from
May 6, 2024

Conversation

jorgeantonio21
Copy link
Contributor

@jorgeantonio21 jorgeantonio21 commented May 4, 2024

This PR handles the following:

  • Different events emitted by the Sui smart contract. For now it ignores all events except Text2TextPromptEvent and Text2ImagePromptEvent.
  • Adds a PromptParams enum in order to distinguish between text to text and text to image modalities;
  • Changes the ModelTrait signature in order to accommodate Input: TryFrom<PromptParams> instead of DeserializeOwned.

match event.type_.name.as_str() {
"DisputeEvent" => todo!(),
"FirstSubmission" | "NodeRegisteredEvent" | "NodeSubscribedToModelEvent" => {}
"Text2TextPromptEvent" | "NewlySampledNodesEvent" => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's NewlySampledNodesEvent and why does it trigger text2text event?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If there is a node that times out for a request, that means it becomes unresponsive, we then resample new nodes.

@jorgeantonio21 jorgeantonio21 merged commit 3416d0e into main May 6, 2024
1 check passed
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.

2 participants