Open mtournier-apixio opened 2 years ago
Apologies for the slow response (been dealing with some health issues and not paying attention to Github for a bit).
Is the root problem around the val
prefix vs plain variable assignment? In older scala kernels it allowed redefinition with a val
so I didn't bother fixing that. If that's the problem we may need to make the variable assignment a little smarter in trying to see if it's been defined above already.
Matthew, no apology necessary!
In my use case, and perhaps to keep the "parameters" cell as close as possible for python, I would ideally see as you said in your response. So I can have a cell like:
val ArgumentA = "foo"
val ArgumentB = "bar"
Again thanks for the awesome work, I love papermill.
On Thu, Jun 9, 2022 at 7:08 PM Matthew Seal @.***> wrote:
Apologies for the slow response (been dealing with some health issues and not paying attention to Github for a bit).
Is the root problem around the val prefix vs plain variable assignment? In older scala kernels it allowed redefinition with a val so I didn't bother fixing that. If that's the problem we may need to make the variable assignment a little smarter in trying to see if it's been defined above already.
— Reply to this email directly, view it on GitHub https://github.com/nteract/papermill/issues/662#issuecomment-1151700271, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMG6YOSBXYKSBFUHKBS6VZLVOJ2PLANCNFSM5VGEYJDQ . You are receiving this because you authored the thread.Message ID: @.***>
This issue appears whenever I try to run Scala notebooks (spylon-kernel) notebooks using papermill.
If I make the scala val assignments in a standalone
parameters
cell, papermill does not inject them properly.This spylon-kernel notebook example does not change parameters:
This works (if I make the variable call inside of
%%init_spark
and as a python code). In the output notebook, papermill converted the python assignments into Scala code (!):Note that in this second case, I can't make a Scala variable explicit in a cell.
Relevant versions:
bash script:
Is it possible to correct this so it works like it is expected (as the first example)?
Thanks guys, I love papermill, big appreciation for what you are doing for the community.