Closed timg512372 closed 1 year ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
Hi @timg512372 - thank you for opening this issue. I probably won't be able to take a closer look at this for a few days but wanted to get back to you.
The doc text you quoted could probably use some clarification, although I suspect it won't necessarily provide a solution. I think a better phrasing might be:
Each kernel.json’s kernel_provisioner stanza can specify an optional config stanza where its key/value pairs are included as keyword arguments to each kernel provisioner’s constructor relative to the provisioner identified by the provisioner_name entry.
This transformation is performed in the KernelProovisionerFactory
in jupyter_client
.
The idea is that each of the referenced keys in the config stanza correspond to configurable traits defined throughout the provisioner's class hierarchy (parent
is such a trait, as are kernel_spec
and kernel_id
defined on KernelProvisionerBase
).
When that's the case, I can't recall if they would appear as kwargs
by the time the __init__()
method is invoked as they may already be set into that class instance's traits and referenced via self.key
. (The traitlets package provides lots of metadata-magic that can be a bit confusing IMO.)
I'm curious what keyword arguments you do see?
From what class does your custom provisioner derive?
Hi @kevin-bates,
Thank you for your help! The key value pairs in the config stanza are indeed into the constructor as keyword arguments, and I can see them in kwargs
in the __init__()
method. For context, I was trying to derive off of DistributedProvisioner.
Right on - glad to hear that. If you have any time, it would be great to have an update to the docs. No worries if not.
Hi, I'm trying to create a custom kernel spec JSON file, and I would like the configuration variables to be available inside a custom gateway_provisioner. I'm looking at this line of documentation under System Architecture
but when I put variables under the config stanza and inspect the arguments passed into the kernel provisioner's constructor, I don't see any of my configuration variables. Do you know where I might be able to find the configuration variables?
kernel.json