-
Notifications
You must be signed in to change notification settings - Fork 3
Question Playground #288
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
Question Playground #288
Changes from 66 commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
94397e1
Initial playground
anmarhindi 949c6e9
Add playground route and search question model
LennartSchmidtKern e050d0a
initial eval set endpoint
anmarhindi b705cf5
Upgrade alembic version for eval set
anmarhindi 3a3efc4
similar records
LennartSchmidtKern e0e5f43
Merge branch 'question-playground' of github.com:code-kern-ai/refiner…
LennartSchmidtKern a5d6901
restructure
LennartSchmidtKern ce1c864
Remove alembic upgrade due to db arch changes
anmarhindi df1c4d4
dummy endpoints
LennartSchmidtKern 613c0c8
adds_refinery_playground_evaluation
anmarhindi e02e9ee
Merge remote-tracking branch 'origin/question-playground' into questi…
anmarhindi dfaf220
Remove old matching set
anmarhindi 8024f48
correct names
LennartSchmidtKern f3a722d
Merge branch 'question-playground' of github.com:code-kern-ai/refiner…
LennartSchmidtKern d1e6550
evaluation runs
LennartSchmidtKern 65bbe0f
sub ref
anmarhindi a4119c1
Merge remote-tracking branch 'origin/question-playground' into questi…
anmarhindi fd643f6
Add getters to playground manager
anmarhindi 4b0e254
renaming. init run
LennartSchmidtKern 1f0efe2
improve results
LennartSchmidtKern 35924b1
creation
LennartSchmidtKern cd04737
init run
LennartSchmidtKern f178efa
simple contains search
LennartSchmidtKern 74a0fc8
user fix
LennartSchmidtKern fb9b97e
fix search, expand
LennartSchmidtKern bca7ddb
fix formato, add limit
LennartSchmidtKern ff3a840
limit
LennartSchmidtKern f8b16e7
Remove unused auth manager
anmarhindi b419d8d
Add records batch endpoint
anmarhindi 96dd695
fix evaluation run
LennartSchmidtKern 2205612
Add Evaluation set by group endpoint
anmarhindi f4823da
Add auth check for project access endpoints
anmarhindi 8ccc7da
delete endpoints
LennartSchmidtKern c1e4396
Merge branch 'question-playground' of github.com:code-kern-ai/refiner…
LennartSchmidtKern 5cda593
Get evaluation run by id
lumburovskalina c316a64
Merge branch 'question-playground' of github.com:code-kern-ai/refiner…
lumburovskalina c31ec8f
change result data
LennartSchmidtKern f8ce5d7
Merge branch 'question-playground' of github.com:code-kern-ai/refiner…
LennartSchmidtKern b1bcb8f
snake case results
LennartSchmidtKern af6c4d3
fix naming
LennartSchmidtKern ffb1661
filter
LennartSchmidtKern 5a163f6
Fixed evaluation run by id request
lumburovskalina 7a81b47
Delete evaluation runs
lumburovskalina da5440c
fix recrods
LennartSchmidtKern 4045257
concurrency and limits
LennartSchmidtKern 3e2333b
threshold
LennartSchmidtKern 44f2a88
threshold run
LennartSchmidtKern 8b90ceb
user id fix
LennartSchmidtKern dc9d467
reformulation prompt
LennartSchmidtKern 4bedf4d
requirements
LennartSchmidtKern 5fb8d6b
change output
LennartSchmidtKern 372c2c4
api key dyn
LennartSchmidtKern a1527a2
Simple error handling for reformulation
anmarhindi 9c04442
group fetch
LennartSchmidtKern 0d436a6
Merge branch 'question-playground' of github.com:code-kern-ai/refiner…
LennartSchmidtKern ed9ab38
improve record fetching
LennartSchmidtKern e1d9787
record batch
LennartSchmidtKern 354f59d
simplifiy args
LennartSchmidtKern 0ff0f71
fix exception
LennartSchmidtKern 6d5013a
Remove redundant check, delegate to json loads raise
anmarhindi b0d60a2
Add playground question model
anmarhindi f01901a
Change endpoint handling of saveQuestion
anmarhindi 6cc8651
Add initial get playground questions endpoint
anmarhindi 51b11f0
sub ref
anmarhindi ddbab82
sub ref
anmarhindi 1204b2b
Delegate save question to neural search
anmarhindi 709728e
Update model and manager
anmarhindi b9c4fd7
sub ref
anmarhindi 62ae6a0
Enable project access check
anmarhindi a0fcc4e
list comp
anmarhindi b2df18b
Use adjusted run state from enum
anmarhindi 304da3e
Rename base uri
anmarhindi 2ad52c6
eval run function
LennartSchmidtKern 6260898
Merge branch 'question-playground' of github.com:code-kern-ai/refiner…
LennartSchmidtKern 0848d56
Resolve tensor via connector
anmarhindi ec02d1f
Merge remote-tracking branch 'origin/question-playground' into questi…
anmarhindi 878595d
Get tensor for text via connector
anmarhindi 19a359b
Remove unused import
anmarhindi 7278172
Get enum value for state
anmarhindi 1d8da3d
sub ref
anmarhindi c698650
sub ref
anmarhindi 672eeb0
sub ref
anmarhindi 8bd9f9a
sub ref
anmarhindi 79ad2df
Add traceback to exception handling
anmarhindi 2c4fc72
Deleting questions and order desc
lumburovskalina 91ba23a
sub ref
anmarhindi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
"""adds_playground_question | ||
|
||
Revision ID: 0c8eb3ff1c71 | ||
Revises: ac97442726d2 | ||
Create Date: 2025-02-04 09:48:41.971287 | ||
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '0c8eb3ff1c71' | ||
down_revision = 'ac97442726d2' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('playground_question', | ||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False), | ||
sa.Column('question', sa.String(), nullable=True), | ||
sa.Column('created_at', sa.DateTime(), nullable=True), | ||
sa.Column('created_by', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('project_id', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('embedding_id', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('record_ids', sa.JSON(), nullable=True), | ||
sa.Column('meta_info', sa.JSON(), nullable=True), | ||
sa.ForeignKeyConstraint(['created_by'], ['user.id'], ondelete='SET NULL'), | ||
sa.ForeignKeyConstraint(['embedding_id'], ['embedding.id'], ondelete='SET NULL'), | ||
sa.ForeignKeyConstraint(['project_id'], ['project.id'], ondelete='CASCADE'), | ||
sa.PrimaryKeyConstraint('id') | ||
) | ||
op.create_index(op.f('ix_playground_question_created_by'), 'playground_question', ['created_by'], unique=False) | ||
op.create_index(op.f('ix_playground_question_embedding_id'), 'playground_question', ['embedding_id'], unique=False) | ||
op.create_index(op.f('ix_playground_question_project_id'), 'playground_question', ['project_id'], unique=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f('ix_playground_question_project_id'), table_name='playground_question') | ||
op.drop_index(op.f('ix_playground_question_embedding_id'), table_name='playground_question') | ||
op.drop_index(op.f('ix_playground_question_created_by'), table_name='playground_question') | ||
op.drop_table('playground_question') | ||
# ### end Alembic commands ### |
83 changes: 83 additions & 0 deletions
83
alembic/versions/ac97442726d2_adds_refinery_playground_evaluation.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
"""adds_refinery_playground_evaluation | ||
|
||
Revision ID: ac97442726d2 | ||
Revises: eb5ecbee5090 | ||
Create Date: 2025-01-16 13:26:43.059523 | ||
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'ac97442726d2' | ||
down_revision = 'eb5ecbee5090' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('evaluation_group', | ||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False), | ||
sa.Column('name', sa.String(), nullable=True), | ||
sa.Column('created_at', sa.DateTime(), nullable=True), | ||
sa.Column('created_by', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('project_id', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('evaluation_set_ids', sa.JSON(), nullable=True), | ||
sa.ForeignKeyConstraint(['created_by'], ['user.id'], ondelete='SET NULL'), | ||
sa.ForeignKeyConstraint(['project_id'], ['project.id'], ondelete='CASCADE'), | ||
sa.PrimaryKeyConstraint('id') | ||
) | ||
op.create_index(op.f('ix_evaluation_group_created_by'), 'evaluation_group', ['created_by'], unique=False) | ||
op.create_index(op.f('ix_evaluation_group_project_id'), 'evaluation_group', ['project_id'], unique=False) | ||
op.create_table('evaluation_set', | ||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False), | ||
sa.Column('question', sa.String(), nullable=True), | ||
sa.Column('created_at', sa.DateTime(), nullable=True), | ||
sa.Column('created_by', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('project_id', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('record_ids', sa.JSON(), nullable=True), | ||
sa.ForeignKeyConstraint(['created_by'], ['user.id'], ondelete='SET NULL'), | ||
sa.ForeignKeyConstraint(['project_id'], ['project.id'], ondelete='CASCADE'), | ||
sa.PrimaryKeyConstraint('id') | ||
) | ||
op.create_index(op.f('ix_evaluation_set_created_by'), 'evaluation_set', ['created_by'], unique=False) | ||
op.create_index(op.f('ix_evaluation_set_project_id'), 'evaluation_set', ['project_id'], unique=False) | ||
op.create_table('evaluation_run', | ||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False), | ||
sa.Column('evaluation_group_id', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('created_at', sa.DateTime(), nullable=True), | ||
sa.Column('created_by', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('project_id', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('embedding_id', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.Column('state', sa.String(), nullable=True), | ||
sa.Column('results', sa.JSON(), nullable=True), | ||
sa.Column('meta_info', sa.JSON(), nullable=True), | ||
sa.ForeignKeyConstraint(['created_by'], ['user.id'], ondelete='SET NULL'), | ||
sa.ForeignKeyConstraint(['embedding_id'], ['embedding.id'], ondelete='SET NULL'), | ||
sa.ForeignKeyConstraint(['evaluation_group_id'], ['evaluation_group.id'], ondelete='SET NULL'), | ||
sa.ForeignKeyConstraint(['project_id'], ['project.id'], ondelete='CASCADE'), | ||
sa.PrimaryKeyConstraint('id') | ||
) | ||
op.create_index(op.f('ix_evaluation_run_created_by'), 'evaluation_run', ['created_by'], unique=False) | ||
op.create_index(op.f('ix_evaluation_run_embedding_id'), 'evaluation_run', ['embedding_id'], unique=False) | ||
op.create_index(op.f('ix_evaluation_run_evaluation_group_id'), 'evaluation_run', ['evaluation_group_id'], unique=False) | ||
op.create_index(op.f('ix_evaluation_run_project_id'), 'evaluation_run', ['project_id'], unique=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f('ix_evaluation_run_project_id'), table_name='evaluation_run') | ||
op.drop_index(op.f('ix_evaluation_run_evaluation_group_id'), table_name='evaluation_run') | ||
op.drop_index(op.f('ix_evaluation_run_embedding_id'), table_name='evaluation_run') | ||
op.drop_index(op.f('ix_evaluation_run_created_by'), table_name='evaluation_run') | ||
op.drop_table('evaluation_run') | ||
op.drop_index(op.f('ix_evaluation_set_project_id'), table_name='evaluation_set') | ||
op.drop_index(op.f('ix_evaluation_set_created_by'), table_name='evaluation_set') | ||
op.drop_table('evaluation_set') | ||
op.drop_index(op.f('ix_evaluation_group_project_id'), table_name='evaluation_group') | ||
op.drop_index(op.f('ix_evaluation_group_created_by'), table_name='evaluation_group') | ||
op.drop_table('evaluation_group') | ||
# ### end Alembic commands ### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.