-
Notifications
You must be signed in to change notification settings - Fork 385
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
[NEW] Jupyter analyzer+responder for Cortex #1199
[NEW] Jupyter analyzer+responder for Cortex #1199
Conversation
@jeromeleonard EDIT: I've added a screenshot of a settings example if you need so within the READMEs. |
@LetMeR00t thanks for the update. but can't find the menu in Jupyterhub to add tags in cells: and still have this error message:
|
Hi @jeromeleonard |
I tried to install and launch Jupiterhub both using process and docker, same results. I followed both guides: |
Hi @jeromeleonard, First remark is that your output folder setting you sent me by email isn’t having slashes as mentionned in the documentation, please review it and see the sample screenshot within the doc to have an example if needed. My current assumption is that the output url isn’t built as expected as the folder doesn’t have slashes when they are needed. This might returned an error from Jupyter (because url isn’t valid as it’s not existing) and you should see this error in Jupyter logs. My second remark would be to enable the remote execution setting of the analyzer that will use a different path in the code and let you execute your notebook on the Jupyter instance directly by communicating with the kernel directly (and avoid to have to install all the libraries required by the notebook itself on the cortex instance as requirements) Let me know if this is helping |
I updated the configuration.
I don't know if this line means something: and new error message from the analyzer:
|
It’s not an issue to have none session id, a new one will be created. if the issue is coming from the missing slashes, I’ll probably review the way I’m building the URL |
Please note also that the output path should end with a slash too (as in the screenshot sample). |
I reviewed the readme several times, and honestly don't know what i've missed. |
Still the same issue even if those changes then ?
a simple :
And see how the url is built ? Other point, is the output folder already existing ? Thank you and sorry for the inconvenience of the issues encountered |
I have already created the folder |
Hi @jeromeleonard |
Other solution could also be just that I did a mistake on the location of the json.loads As the JSON is parsed completely and I’m getting the « buf » variable as input that is a string, I just remember that it would be more for the buf variable instead to do the json.loads so if the first solution isn’t working, try to replace the « json=json.loads(payload) » by « json=payload » and « payload["content"] = buf » by « payload["content"] = json.loads(buf) » let me know if this is helping |
made the changes. New behaviour:
I printed notebook.keys() : |
This time i get the output notebook in the output folder. But still get this error message regarding |
I managed to make it work 🎉 I forgot to set the option |
Hi @jeromeleonard, First thing, I've checked my patch code and indeed, it was the latest version I talked you about with the wrong location of the json.loads. I've updated it in the READMEs and in the issue I created accordingly. Second thing is that I replaced the parameter "any_only_html" to "any_generate_html" to avoid any confusion. The idea is that within the script, we are generating a "beautiful render" of the notebooks but it's causing the response from the connector to be heavy (as it's embedding the HTML code). In order to reduce that, we propose to not forcely generate the HTML code if the users don't want to. Third thing is to review the way I'm building the URLs to make it easier. Additionally, I've added the feature to support datime format within the ouput folder name. An explanation is provided within the documentation. I let you review/check those changes again hoping it will get your life easier :) Be aware that your current parameters for the cortex analyzer/responder aren't good anymore, see the screenshot sample to get some help. Thank you for the review. If you need anything else from me, let me know |
Thank you for the updated. Tested and everything is working fine. My Dockerfile:
The container is run but get this error:
I am currently investigating |
Hi, |
How do you configure your analyzer with such Dockerfile ? |
working in running a mitproxy to log everything. Then you just have to disable your analyzer, "Refresh" them, and enable it again. I use the same configuration. |
Perfect |
I had some issues using it with a docker image and spent some time to find the reason. I found a missing python requirement: |
Thank you |
Hello everyone,
This is a new analyzer+responder for Cortex which is able to execute notebooks in Jupyter.
Please, let me know if I have to change something but this analyzer seems to be a must have for me.
Thank you