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

feat(evaluation): evaluation results in UI #631

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

geclos
Copy link
Collaborator

@geclos geclos commented Nov 18, 2024

  • Introduced new components for manual evaluation results submission, including boolean, number, and text types.
  • Updated EvaluationResults to handle manual evaluations separately from automated ones.
  • Added new API routes to fetch document logs with evaluation results.
  • Implemented new hooks and stores for managing evaluation results and document logs with evaluation results.
  • Modified existing components to support the new manual evaluation flow.
  • Updated serialization logic for provider logs to accommodate evaluation-specific requirements.
  • Enhanced the evaluation results update process to include reason updates and event publishing.

This change allows users to manually submit evaluation results, providing more flexibility and control over the evaluation process.

@geclos geclos force-pushed the feature/hitl_evaluations_in_ui branch 5 times, most recently from 201590a to 451374b Compare November 19, 2024 12:52
@geclos geclos marked this pull request as ready for review November 19, 2024 12:52
@geclos geclos force-pushed the feature/hitl_evaluations_in_ui branch from 451374b to 86e66d0 Compare November 19, 2024 12:52
@andresgutgon
Copy link
Contributor

Added new API routes to fetch document logs with evaluation results.

Is this one?

#601

<Text.H4 noWrap>
{typeof value === 'string' && value.length > 30
? `${value.slice(0, 30)}...`
: (value as string)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait. This should not be necessary. Review the CSS it can be done with ellipsis prop in this text + a wrap div. Look for text examples with ellipsis

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i think it's because it's a table element

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't matter

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

what i mean is that in order for it to work i would have to put a max width limit to the wrapper div which ends up being the same hardcoding

- Introduced new components for manual evaluation results submission, including boolean, number, and text types.
- Updated `EvaluationResults` to handle manual evaluations separately from automated ones.
- Added new API routes to fetch document logs with evaluation results.
- Implemented new hooks and stores for managing evaluation results and document logs with evaluation results.
- Modified existing components to support the new manual evaluation flow.
- Updated serialization logic for provider logs to accommodate evaluation-specific requirements.
- Enhanced the evaluation results update process to include reason updates and event publishing.

This change allows users to manually submit evaluation results, providing more flexibility and control over the evaluation process.
@geclos geclos force-pushed the feature/hitl_evaluations_in_ui branch 3 times, most recently from 736cab2 to 019eca7 Compare November 19, 2024 13:34
)
}
className={cn(
'cursor-pointer border-b-[0.5px] h-12 max-h-12 border-border',
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 0.5px?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I.... don't remember 😂 but there's a reason

@@ -18,6 +20,8 @@ export default function TotalsPanels({
documentUuid: string
evaluationId: number
}) {
const { data: evaluations } = useEvaluations()
const evaluation = evaluations.find((e) => e.id === evaluationId)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't memo this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

very small n it's negligible

@geclos geclos force-pushed the feature/hitl_evaluations_in_ui branch from 019eca7 to f62fffd Compare November 19, 2024 13:37
return Result.error(new NotFoundError('Workspace not found'))
}

publisher.publishLater({
Copy link
Contributor

Choose a reason for hiding this comment

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

If the transaction is rollback this will be send anyway?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah we still have this issue

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not this?

const result = Transaction.call(
  // Things....
)
if (result.error) return result

publisher.publishLater...
return result

@geclos geclos merged commit 7c69907 into main Nov 19, 2024
3 checks passed
@geclos geclos deleted the feature/hitl_evaluations_in_ui branch November 19, 2024 14:04
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants