Skip to content

Commit

Permalink
add passthrough filter for baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
Ar4l committed Mar 18, 2024
1 parent 1b13086 commit 1b0af53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code4me-server/src/query_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,13 @@ def get_model(model_name):
return model

class Filter(enum.Enum):
NO_FILTER = 'no_filter'
FEATURE = 'feature'
CONTEXT = 'context'
JOINT_H = 'joint_h'
JOINT_A = 'joint_a'

no_filter = lambda request_json: True
logres = Logres(coef, intercept)
set_all_seeds() # just in case
context_filter = MyPipeline( device=DEVICE, task='text-classification',
Expand All @@ -200,6 +202,7 @@ class Filter(enum.Enum):
model_name='13_jonberta-biased-12_codeberta-biased-2e-05lr--0-(ATTN-208C_f-[0]L)-2e-05lr--4' )

filters = {
Filter.NO_FILTER: no_filter,
Filter.FEATURE: logres.predict,
Filter.CONTEXT: context_filter,
Filter.JOINT_H: joint_h_filter,
Expand Down

0 comments on commit 1b0af53

Please sign in to comment.