Commit bcfabe8
PDL Optimizer (#941)
* feat: remove tauri cli support for running python interpreter
This also updates the tauri cli to rename runr -> run (run previously invoked the python interpreter).
And adds stub support for --data, --data-file, --trace command line options (not implemented yet).
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* chore: bump rust dependencies to resolve alert
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* test: tauri github actions test should apt install the deb
This also removes the beeai compiler test in that workflow, as we now cover that in the core rust interpreter tests.
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* feat: support for --data and --data-file in rust interpreter
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* Add optimizer module
Signed-off-by: Claudio Spiess <[email protected]>
* Remove BAM
Signed-off-by: Claudio Spiess <[email protected]>
* Initial prompt library
Signed-off-by: Claudio Spiess <[email protected]>
* Clean up & bring in changes
Signed-off-by: Claudio Spiess <[email protected]>
* AST dump fixes
Signed-off-by: Claudio Spiess <[email protected]>
* Documentation and fixes
Signed-off-by: Claudio Spiess <[email protected]>
* Finish prompt lib docs
Signed-off-by: Claudio Spiess <[email protected]>
* Address feedback
Signed-off-by: Claudio Spiess <[email protected]>
* Lint
Signed-off-by: Claudio Spiess <[email protected]>
* fix: begin phasing in Metadata (common defs, etc. attrs) into rust AST
Rather than duplicating this "metadata" logic -- the stuff common to all non-literal blocks. This just starts the migration. The main trick is to use the serde `flatten` capability, so that we can maintain a separate Metadata struct in Rust, but have it flattened into the enclosing object for serde.
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* chore: update granite-io dependency (#896)
Signed-off-by: Louis Mandel <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* refactor: move def attr into Metadata (rust interpreter)
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* feat: introduce Expr typing and apply it to IfBlock.condition
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* feat: update rust Call AST to use Expr for condition attr
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* chore: bump to rust 2024 edition
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* feat: continue to flesh out block metadata structure in rust
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* refactor: add metadata attr to remaining rust block asts
This also adds initial scaffolding for timing, and adds a ModelBlock and ArrayBlockBuilder.
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* feat: update rust Repeat AST to use Expr for `for` attr (#904)
Signed-off-by: Louis Mandel <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* refactor: introduce Advanced enum to rust AST
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* refactor: refactor rust ast to place metadata in common struct
And start populating the timing info (incomplete).
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* fix: improve deserialization of python-generated model block traces
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* fix: in rust ast, allow ModelBlock model to be an expr
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* feat: initial pdl__id and --trace support for rust interpreter
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* fix: update rust interpreter to create Data blocks for expr eval, and model_input trace field
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* fix: populate trace context field in rust interpreter
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* Update stop sequences in parameters (#861)
* Stop sequence parameter update to align with ollama
Signed-off-by: Jing Chen <[email protected]>
* Update results
Signed-off-by: Jing Chen <[email protected]>
---------
Signed-off-by: Jing Chen <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* refactor: extract platform-generic logic from run_ollama_model() handler
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* fix: rust interpreter was not handling pdl__context for re-runs of traces
This only covers the run_model code path, but it's a start.
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* feat: improve support for importing stdlib in python code blocks
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* skeleton-of-thought example (#919)
Signed-off-by: Mandana Vaziri <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* Bump litellm and openai versions (#920)
Signed-off-by: Mandana Vaziri <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* fix: improve support for rust interpreter python imports from venv
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* chore: bump tauri and npm dependencies
And leverage the new prevent overflow feature of tauri.
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* chore: bump ui to 0.6.1 (#921)
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* fix: rust ast support for gsm8k, including jsonl parser
The program may not run 100% yet, but it parses now.
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* chore: bump rust dependencies
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* feat: improve support for tool calling in ollama-rs
We need to send a system prompt to some models. Plus add some stubs for pydantic for python tool execution.
This also includes nascent support for openai-rs (not fully funcitonal yet).
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* Fully qualify import (#930)
Signed-off-by: Ed Snible <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* feat: some regex parser support for rust interpreter
Split mode TODO!
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* Change to sys.path for python code block (#931)
Signed-off-by: Mandana Vaziri <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* granite-io hallucination demo example and notebook (#932)
Signed-off-by: Mandana Vaziri <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* Lint
Signed-off-by: Claudio Spiess <[email protected]>
* Refactor
Signed-off-by: Claudio Spiess <[email protected]>
* Tests
Signed-off-by: Claudio Spiess <[email protected]>
* Formatting
Signed-off-by: Claudio Spiess <[email protected]>
* Lint
Signed-off-by: Claudio Spiess <[email protected]>
* Skip tests for now
Signed-off-by: Claudio Spiess <[email protected]>
* Update schema
Signed-off-by: Claudio Spiess <[email protected]>
* Add contrib. prompt library (#927)
* Initial prompt library
Signed-off-by: Claudio Spiess <[email protected]>
* Documentation and fixes
Signed-off-by: Claudio Spiess <[email protected]>
* Finish prompt lib docs
Signed-off-by: Claudio Spiess <[email protected]>
* Address feedback
Signed-off-by: Claudio Spiess <[email protected]>
---------
Signed-off-by: Claudio Spiess <[email protected]>
* Fixed the bug where pdl.__version__ was not set (#882)
It wasn't set previously because importlib searches for the distribution
name and not the module's top-level name. Fallbacks are in place to
revert to searching for 'pdl', and if that fails, it fallsback to the
hardcoded version in _version.py
Signed-off-by: Abi Ullattil <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* chore: update pre-commit tools (#937)
Signed-off-by: Louis Mandel <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* Use granite-io async interface (#936)
Signed-off-by: Louis Mandel <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* Lint
Signed-off-by: Claudio Spiess <[email protected]>
* chore: bump ui dependences
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* fix: skip failing execution tests (#938)
Signed-off-by: Louis Mandel <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* independent implementation (#934)
* independent implementation
Signed-off-by: Mandana Vaziri <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* feat: add a `parse_dict` function to `pdl_parser` (#943)
Signed-off-by: Louis Mandel <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* Address feedback 1
Signed-off-by: Claudio Spiess <[email protected]>
* Address feedback 2
Signed-off-by: Claudio Spiess <[email protected]>
* Lint & fix mypy module warning
Signed-off-by: Claudio Spiess <[email protected]>
* Skip tests again
Signed-off-by: Claudio Spiess <[email protected]>
* Try to resolve wikipedia package in ci
Signed-off-by: Claudio Spiess <[email protected]>
* Fix rebase
Signed-off-by: Claudio Spiess <[email protected]>
* Fix pyproject
Signed-off-by: Claudio Spiess <[email protected]>
* Move multiprocess to optional
Signed-off-by: Claudio Spiess <[email protected]>
* Add ipython to pdl-live
Signed-off-by: Claudio Spiess <[email protected]>
* Fix trace metadata
Signed-off-by: Claudio Spiess <[email protected]>
* Add documentation
Signed-off-by: Claudio Spiess <[email protected]>
* Add optimizer test PDL
Signed-off-by: Claudio Spiess <[email protected]>
* Add config and expand docs
Signed-off-by: Claudio Spiess <[email protected]>
---------
Signed-off-by: Nick Mitchell <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Louis Mandel <[email protected]>
Signed-off-by: Jing Chen <[email protected]>
Signed-off-by: Mandana Vaziri <[email protected]>
Signed-off-by: Ed Snible <[email protected]>
Signed-off-by: Abi Ullattil <[email protected]>
Co-authored-by: Nick Mitchell <[email protected]>
Co-authored-by: Louis Mandel <[email protected]>
Co-authored-by: Jing Chen <[email protected]>
Co-authored-by: Mandana Vaziri <[email protected]>
Co-authored-by: Nick Mitchell <[email protected]>
Co-authored-by: Ed Snible <[email protected]>
Co-authored-by: Abi Ullattil <[email protected]>1 parent 01be02e commit bcfabe8
File tree
35 files changed
+3672
-49
lines changed- contrib/prompt_library
- docs
- examples/optimizer
- pdl-live-react/src
- view/code
- src/pdl
- optimize
- tests
- data
35 files changed
+3672
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
104 | | - | |
| 106 | + | |
105 | 107 | | |
106 | | - | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
110 | | - | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
123 | | - | |
| 128 | + | |
124 | 129 | | |
125 | | - | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
0 commit comments