Skip to content

Vb/model offline eval plt 1107 #1682

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

Merged
merged 6 commits into from
Jun 19, 2024
Merged

Conversation

vbrodsky
Copy link
Contributor

@vbrodsky vbrodsky commented Jun 18, 2024

Description

Story: SDK support for offline model evaluation use cases

This story adds support for creation of offline chat model evaluation projects and verifies the following offline and live chat evalutation properties using sdk integration tests.

For an offline project:

  • an ontology can be added
  • rows can be added after project creation
  • a model config can not be added

For a live chat model evaluation project we now verify that

  • rows can not be added after project creation

I refactored create project calls to make sure users will not, inadvertently, cause an issue by supplying incorrect parameters or missing important parameters.

  • For each project type - live chat evaluation, offline chat evaluation and 'other' projects there is a separate method
  • Each method sets defaults for certain important parameters that a user can not override
  • All methods share a common _create_project() method

Additionally I have updated handling of EditorTaskType. In a previous release, a new editor task typed cause client get_project() method to break. Now we will set editor task type to Missing=None

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Document change (fix typo or modifying any markdown files, code comments or anything in the examples folder only)

All Submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you provided a description?
  • Are your changes properly formatted?

New Feature Submissions

  • Does your submission pass tests?
    There failing integration tests not related to my code

  • Have you added thorough tests for your new feature?

  • Have you commented your code, particularly in hard-to-understand areas?

  • Have you added a Docstring?

Changes to Core Features

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you updated any code comments, as applicable?

@vbrodsky vbrodsky requested a review from a team as a code owner June 18, 2024 17:37
@vbrodsky vbrodsky marked this pull request as draft June 18, 2024 17:37
@vbrodsky vbrodsky force-pushed the VB/model-offline-eval_PLT-1107 branch from feb64c7 to 4f90d2a Compare June 18, 2024 19:10
@vbrodsky vbrodsky force-pushed the VB/model-offline-eval_PLT-1107 branch from 4f90d2a to 115b78d Compare June 18, 2024 21:55
@vbrodsky vbrodsky marked this pull request as ready for review June 18, 2024 22:09
return self._create(Entity.Project, params, extra_params)


# **** Create Project end ****
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this line + extra whitespace

return self._create_project(**kwargs)

def create_offline_model_evaluation_project(self, **kwargs) -> Project:
kwargs["media_type"] = MediaType.Conversational
Copy link
Contributor

Choose a reason for hiding this comment

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

We should type these arguments and add a docstring

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Re: typed arguments, see my proposal above #1682 (comment)
I will add a docstring (forgot to add it). Since these arguments are not user-facing, I propose to clarify them as code comments

Copy link
Contributor

Choose a reason for hiding this comment

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

is create_offline_model_evaluation_project not user facing? it's part of the client right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is user facing, but the user is not expected to pass in / set those args

Docstring updates
Copy link
Contributor

@sfendell-labelbox sfendell-labelbox left a comment

Choose a reason for hiding this comment

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

LGTM

@vbrodsky vbrodsky merged commit 555ce57 into develop Jun 19, 2024
12 of 22 checks passed
@vbrodsky vbrodsky deleted the VB/model-offline-eval_PLT-1107 branch June 19, 2024 18:22
vbrodsky pushed a commit that referenced this pull request Jun 20, 2024
This reverts commit 555ce57, reversing
changes made to dc86872.
vbrodsky pushed a commit that referenced this pull request Jun 24, 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.

2 participants