Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
hbcarlos committed Feb 15, 2022
1 parent 6322120 commit 2834bb9
Showing 1 changed file with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Some of the chosen parameter values can be saved in e.g. the notebook metadata s

## Detailed Explanation

As described in previous sections, we propose to parameterize the kernel specs file. In the example shown below, we can see the kernel specs file from the kernel xeus-cling. We suggest changing the last parameter of the execution command `-std=c++11` to have a variable `-std=${cpp_version}` and adding a new object `parameters` to the metadata of the kernel specs.
As described in previous sections, we propose to parameterize the kernel specs file. In the example shown below, we can see the kernel specs file from the kernel xeus-cling. We suggest changing the last parameter of the execution command `-std=c++11` to have a variable `-std=${parameters.cpp_version}` and adding a new object `parameters` to the metadata of the kernel specs.

```=json
{
Expand All @@ -33,6 +33,9 @@ As described in previous sections, we propose to parameterize the kernel specs f
"{connection_file}",
"-std=c++11"
],
env: [
"XEUS_LOGLEVEL=ERROR"
],
"language": "C++11"
}
```
Expand All @@ -43,16 +46,33 @@ As described in previous sections, we propose to parameterize the kernel specs f
"/home/user/micromamba/envs/kernel_spec/bin/xcpp",
"-f",
"{connection_file}",
"-std=${parameters.cpp_version}"
"-std={parameters.cpp_version}"
],
env: [
"XEUS_LOGLEVEL={parameters.xeus_log_level}"
],
"language": "C++"
"metadata": {
"parameters": {
"cpp_version": {
"type": "string",
"default": 'C++14',
"enum": ['C++11', 'C++14', 'C++17'],
"default": "C++14",
"enum": ["C++11", "C++14", "C++17"],
"save": true
},
"xeus_log_level": {
"type": "string",
"default": "ERROR",
"enum": ["TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL"],
"save": true
},
"spark_provisioner": {
"title": "Spark Provisioner Parameters"
"type": "object",
"properties": {
"cpus": {"type": "number", "minimum": 0.5, "maximum": 8.0, "default": 4.0, "description": "The number of CPUs to use for this kernel"},
"memory": {"type": "integer", "minimum": 2, "maximum": 1024, "default": 8, "description": "The number of GB to reserve for memory for this kernel"}
}
}
}
},
Expand Down

0 comments on commit 2834bb9

Please sign in to comment.