File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 4949 help = 'subsetting by confidence from 0% to 100%' ,
5050 type = PERCENTAGE ,
5151)
52+ @click .option (
53+ '--similarity' ,
54+ 'similarity' ,
55+ help = 'subsetting by similarity from 0 to 1.0. Tests scoring above this value are included in the subset.' ,
56+ type = click .FloatRange (min = 0 , max = 1.0 ),
57+ )
5258@click .option (
5359 '--goal-spec' ,
5460 'goal_spec' ,
@@ -242,6 +248,7 @@ def subset(
242248 test_suite : Optional [str ] = None ,
243249 is_get_tests_from_guess : bool = False ,
244250 use_case : Optional [str ] = None ,
251+ similarity : Optional [float ] = None ,
245252):
246253 app = context .obj
247254 tracking_client = TrackingClient (Command .SUBSET , app = app )
@@ -510,6 +517,11 @@ def get_payload(
510517 "type" : "subset-by-goal-spec" ,
511518 "goal" : goal_spec
512519 }
520+ elif similarity is not None :
521+ payload ["goal" ] = {
522+ "type" : "subset-by-similarity" ,
523+ "similarity" : similarity
524+ }
513525 else :
514526 payload ['useServerSideOptimizationTarget' ] = True
515527
You can’t perform that action at this time.
0 commit comments