Skip to content

Conversation

@claudiosv
Copy link
Collaborator

@claudiosv claudiosv commented May 5, 2025

  • Undo PEP604 changes in pdl_ast and pdl_interpreter
  • Unexpected wikipedia package install failure
  • Figure out a solution for the skipped tests (mock?)

Copy link
Collaborator

@mandel mandel left a 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 match instead of ifs in the PDL programs.
  • Check if you have to skip some examples in test_examples_run.py.

starpit and others added 29 commits May 9, 2025 17:49
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]>
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]>
… 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]>
claudiosv and others added 18 commits May 9, 2025 17:51
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]>
@claudiosv claudiosv marked this pull request as ready for review May 12, 2025 15:27
Signed-off-by: Claudio Spiess <[email protected]>
rev: 'v1.15.0'
hooks:
- id: mypy
args: [--explicit-package-bases]
Copy link
Collaborator Author

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

claudiosv added 3 commits May 14, 2025 17:06
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
Signed-off-by: Claudio Spiess <[email protected]>
@claudiosv claudiosv merged commit bcfabe8 into main May 19, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants