[ 
https://issues.apache.org/jira/browse/TOREE-402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15957571#comment-15957571
 ] 

Jakob Odersky commented on TOREE-402:
-------------------------------------

Good point; that's an aspect I didn't think about. Currently kernel directories 
are named according to this python snippet:
{code}
install_dir = self.kernel_spec_manager.install_kernel_spec(self.sourcedir,
                     kernel_name='{}_{}'.format(self.kernel_name, 
interpreter.lower()).replace(' ', '_'),
{code}
basically replacing spaces with underscores and lowercasing letters.

I wouldn't advise relying on this format however as it could change in future 
versions. My recommendation therefore would be to either pursue option 1) or to 
install kernels manually (without using jupyter install).

> Installer should support parameterized kernel names
> ---------------------------------------------------
>
>                 Key: TOREE-402
>                 URL: https://issues.apache.org/jira/browse/TOREE-402
>             Project: TOREE
>          Issue Type: Wish
>          Components: Kernel
>    Affects Versions: 0.2.0
>            Reporter: Christian Kadner
>            Priority: Minor
>
> For enterprise deployments of Apache Toree it would be nice to have more 
> flexibility when specifying kernel name(s) when installing multiple 
> interpreters at the same time.
> Currently the Apache Toree installer allows to specify {{kernel_name}} and 
> {{interpreters}}, i.e. running {code}jupyter toree install 
> --kernel_name='Spark 2.1' --interpresters=Scala,PySpark,SparkR,SQL{code} 
> would result in kernels with these names:
> {code}
> Spark 2.1 - Scala
> Spark 2.1 - PySpark
> Spark 2.1 - SparkR
> Spark 2.1 - SQL
> {code}
> For enterprise deployments that support other languages and Spark versions 
> however this naming scheme is not flexible enough. Suppose this is the 
> desired list of kernels (kernel display names):
> {code}
> Python 2.7 with Spark 1.6
> Python 2.7 with Spark 2.0
> Python 3.5 with Spark 1.6
> Python 3.5 with Spark 2.0
> R with Spark 1.6
> R with Spark 2.0
> Scala 2.10 with Spark 1.6
> Scala 2.11 with Spark 2.0
> {code}
> In order to achieve the above names, one would have to write a custom script 
> to replace the {{display_name}} in the {{kernel.json}} files that get created 
> by the Toree installer.
> It would be nice to enrich the Toree install options to allow for some kind 
> of pattern instead of a fixed string, i.e.:
> {code}
> jupyter toree install --kernel_name='{interpreter.name} {interpreter.version} 
> with Spark {spark.version}' ...
> {code}
> The install documentation might read:
> {noformat}
> --kernel_name=<Unicode> (ToreeInstall.kernel_name)
>     Examples:  '{interpreter.name} {interpreter.version} with Spark 
> {spark.version}'
>     Default:   'Apache Toree - {interpreter.name}'
>     Install the kernel spec with this name. This is also used as the display 
> name for kernels in the Jupyter UI.
> {noformat}
> Of course the placeholders would then have to be replaced by the Toree 
> install code and actual list of available variables may be different from the 
> above suggestion.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to