Closed adampingel closed 1 month ago
See PR: #54
A few notes about how the test failures where debugged, for posterity...
At first, Prompt_Declaration_Language_python.ipynb
was included in the .github/notebook_lists/vanilla_notebooks.txt
and .github/workflows/vanilla_workflow.yaml
, but the tests failed with a mystifying error that pdl
couldn't be found while executing from pdl.pdl import exec_str
. In fact, the pip install
actually failed, but the CI log contained now information about this. The import
then failed. The problem was Python 3.10, which is what the "vanilla" tests. Use. I created new .github/notebook_lists/pdl_notebooks.txt
and .github/workflows/pdl_workflow.yaml
for just this notebook, with Python 3.11.
The example of a chat would fail, because user input was expected. I wrapped the invocation of this "program" thusly:
if os.environ.get('GRANITE_TESTING') is None:
print(exec_str(pdl))
else:
print(\"Since this is the test environment, we skip running the chat example.\")
The user still sees the example and it runs normally in an interactive notebook, but not in the CI test.
Closing, since #54 is now ready to merge.
The github action should execute this notebook:
https://github.com/ibm-granite-community/granite-snack-cookbook/blob/main/recipes/PDL/Prompt_Declaration_Language_python.ipynb
Please update the two files in
.github