-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for query variables in preheat kernel mode #999
Merged
SylvainCorlay
merged 11 commits into
voila-dashboards:main
from
trungleduc:ft/support-query-variable
Oct 14, 2021
Merged
Add support for query variables in preheat kernel mode #999
SylvainCorlay
merged 11 commits into
voila-dashboards:main
from
trungleduc:ft/support-query-variable
Oct 14, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark reportThe execution time (in milliseconds) are grouped by test file, test type and browser. Results table
❗ Test metadata have changed--- /dev/fd/63 2021-10-14 08:19:25.253523727 +0000
+++ /dev/fd/62 2021-10-14 08:19:25.253523727 +0000
@@ -8,27 +8,27 @@
},
"systemInformation": {
"cpu": {
- "brand": "Xeon® Platinum 8272CL",
+ "brand": "Xeon® E5-2673 v3",
"cache": {
"l1d": 65536,
"l1i": 65536,
- "l2": 2097152,
- "l3": 36700160
+ "l2": 524288,
+ "l3": 31457280
},
"cores": 2,
"family": "6",
- "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear",
+ "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt md_clear",
"governor": "",
"manufacturer": "Intel®",
- "model": "85",
+ "model": "63",
"physicalCores": 2,
"processors": 1,
"revision": "",
"socket": "",
- "speed": 2.6,
+ "speed": 2.4,
"speedMax": null,
"speedMin": null,
- "stepping": "7",
+ "stepping": "2",
"vendor": "GenuineIntel",
"virtualization": false,
"voltage": ""
@@ -42,11 +42,11 @@
"codename": "Focal Fossa",
"codepage": "UTF-8",
"distro": "Ubuntu",
- "kernel": "5.8.0-1042-azure",
+ "kernel": "5.8.0-1040-azure",
"logofile": "ubuntu",
"platform": "linux",
"release": "20.04.3 LTS",
- "serial": "f87a2cd4ed534fea8f3ccb44ed7db74e",
+ "serial": "cfc067bfcb844f35865e279a1b0e66c5",
"servicepack": "",
"uefi": false
} |
trungleduc
force-pushed
the
ft/support-query-variable
branch
from
October 11, 2021 21:16
9ff8365
to
49261b6
Compare
This PR is ready for review, failed tests are reported in #961 |
Co-authored-by: David Brochart <[email protected]>
trungleduc
force-pushed
the
ft/support-query-variable
branch
from
October 14, 2021 08:10
daf703c
to
b23e05c
Compare
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References
To benefit from the acceleration of preheating kernel mode, the notebooks need to be pre-rendered before users actually connect to Voilà. But in many real-world cases, the notebook requires some user-specific data to render correctly the widgets, which makes pre-rendering become impossible. To overcome this limit, Voilà offers a feature to treat the most used method for providing user data: the URL query string.
In normal mode, Voilà users can get the query string at run time through the
QUERY_STRING
environment variable:In preheating kernel mode, users can just replace the
os.getenv
call with the helperget_query_string
fromvoila.utils
get_query_string
will pause the execution of notebook in the preheated kernel at its cell and wait for an actual user to connect to Voilà, thenget_query_string
will return the URL query string and continue the execution of remaining cells.If Voilà WebSocket handler is not started at the default protocol (
ws
), the default IP address (127.0.0.1
) or the default port (8866
), users need to provide these values through the environment variablesVOILA_APP_PROTOCOL
,VOILA_APP_IP
andVOILA_APP_PORT
. The easiest way is to set these variables invoila.json
configuration file, for example:voila-qs.mp4
TODO
Code changes
QueryStringSocketHandler
is added at endpoint/voila/query/{kernel-id}
get_query_string
invoila.utils
.websockets
User-facing changes
Backwards-incompatible changes
N/A