Commit 2d41a15
authored
feat(scenarios): add scenario builder to sdk (#706)
* init commit
* formatting fix
* clean up imports in scenario ops unit tests
* use Blueprint and Snapshot objects directly in ScenarioBuilder
* consolidate from_blueprint and from_snapshot unit tests
* further consolidate scenario builder unit tests, make sure async coverage matches sync
* stricter type declaration for _build_params
* expose request options in push()
* add scenario creation smoketests, with push_or_update logic
* update sdk smoke tests with all ops
* avoid modifyng _scorers internal state when normalizing weights (create copy instead)
* formatting fixes
* update builder docstrings to use fluent pattern, replaced all references to RunloopSDK() to 'runloop' instead of 'sdk' or 'client'
* clarify from_blueprint and from_snapshot docstrings
* rename add_scorer methods to be more clear
* format fix
* address type check errors in scenario builder unit tests
* rename add_scorer methods in docstrings
* make sure it is clear that score is 0.0-1.0 inclusive
* update script scorer docstrings
* formatting
* clarify reference solution/gold patch terminology and validation strategy
* make name first argument passed to scenario builder
* add preview method
* clean up unit test imports, rename builder fixture to mock_builder
* added `preview()` method to scenario builder
* rename `_build_params` to `build` (now publicly exposed method)
* formatting
* update docstring examples to use builder.build() instead of builder.push()
* formatting
* update with_problem_statement and with_additional_context docstrings1 parent fb3cc3d commit 2d41a15
File tree
22 files changed
+1963
-91
lines changed- src/runloop_api_client/sdk
- tests
- sdk
- smoketests/sdk
22 files changed
+1963
-91
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
773 | 774 | | |
774 | 775 | | |
775 | 776 | | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
776 | 787 | | |
777 | 788 | | |
778 | 789 | | |
| |||
783 | 794 | | |
784 | 795 | | |
785 | 796 | | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
786 | 807 | | |
787 | 808 | | |
788 | 809 | | |
| |||
0 commit comments