-
Notifications
You must be signed in to change notification settings - Fork 47
PDL Optimizer #941
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
PDL Optimizer #941
Conversation
mandel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks very good!
My main question is to know if it would be possible to move the dataset specific Python code in the examples folder instead of src/pdl?
I have a few other questions and comments:
- Would it be easy to do the formatting changes in a different commint to make the review easier?
- Can you also update the UI with the new ipython block? It is probably mostly re-generating the types in
pdl-live-react(npm run types). - I suggested to use
matchinstead ofifs in the PDL programs. - Check if you have to skip some examples in
test_examples_run.py.
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]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
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]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
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]>
Signed-off-by: Louis Mandel <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
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]>
Signed-off-by: Louis Mandel <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
And start populating the timing info (incomplete). Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
… model_input trace field Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Nick Mitchell <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
* 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]>
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]>
Signed-off-by: Louis Mandel <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Louis Mandel <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
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: Claudio Spiess <[email protected]>
* independent implementation Signed-off-by: Mandana Vaziri <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Louis Mandel <[email protected]> Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
cd40344 to
eb7878e
Compare
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
| rev: 'v1.15.0' | ||
| hooks: | ||
| - id: mypy | ||
| args: [--explicit-package-bases] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this line, mypy reports this error:
src/pdl/_version.py: error: Source file found twice under different module names: "optimizer.fever_evaluator" and "examples.optimizer.fever_evaluator"
src/pdl/_version.py: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#mapping-file-paths-to-modules for more info
src/pdl/_version.py: note: Common resolutions include: a) adding `__init__.py` somewhere, b) using `--explicit-package-bases` or adjusting MYPYPATH
Found 1 error in 1 file (errors prevented further checking)
This is because examples.optimizer.fever_evaluator is imported in test_optimizer.py as from examples.optimizer.fever_evaluator import FEVEREvaluator, but also from within examples/optimizer/optimize.py as from .fever_evaluator import FEVEREvaluator
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
pdl_astandpdl_interpreterwikipediapackage install failure