Skip to content
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

Use in Jupyter JSROOT from ROOT distribution ROOT-10116 #4497

Merged
merged 4 commits into from
Nov 14, 2019

Conversation

linev
Copy link
Member

@linev linev commented Oct 8, 2019

This is try to use Jupyter static location for JSROOT files.
Should be tested

@linev linev requested a review from etejedor October 8, 2019 12:36
@linev linev self-assigned this Oct 8, 2019
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos7-multicore/default, ROOT-fedora27/noimt, ROOT-fedora29/python3, ROOT-ubuntu16/rtcxxmod, mac1014/cxx17, windows10/default
How to customize builds

@linev
Copy link
Member Author

linev commented Oct 14, 2019

@etejedor Can you check this PR?
On my machine ipython notebook does not work - I trying to use python3.
Maybe I could try python2 for that.

@etejedor
Copy link
Contributor

I also get the error:

[E 14:44:59.024 NotebookApp] Exception while loading config file /home/etejedor/.rootnb/jupyter_notebook_config.py
    Traceback (most recent call last):
      File "/home/etejedor/.local/lib/python3.6/site-packages/traitlets/config/application.py", line 562, in _load_config_files
        config = loader.load_config()
      File "/home/etejedor/.local/lib/python3.6/site-packages/traitlets/config/loader.py", line 457, in load_config
        self._read_file_as_dict()
      File "/home/etejedor/.local/lib/python3.6/site-packages/traitlets/config/loader.py", line 489, in _read_file_as_dict
        py3compat.execfile(conf_filename, namespace)
      File "/home/etejedor/.local/lib/python3.6/site-packages/ipython_genutils/py3compat.py", line 198, in execfile
        exec(compiler(f.read(), fname, 'exec'), glob, loc)
      File "/home/etejedor/.rootnb/jupyter_notebook_config.py", line 9, in <module>
        c.NotebookApp.extra_static_paths = ['%s'] % jsrootsys
    TypeError: unsupported operand type(s) for %: 'list' and 'str'

The string substitution is not done properly, the % operator needs to be inside the square brackets.

@linev
Copy link
Member Author

linev commented Oct 17, 2019

The string substitution is not done properly, the % operator needs to be inside the square brackets.

@etejedor Can you try this? I do not have system where ipython notebooks runs.
Once server is up, you should have access to JSROOT files via:
http://server.url:port/static/scripts/JSRootCore.js

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos7-multicore/default, ROOT-fedora27/noimt, ROOT-fedora29/python3, ROOT-fedora30/cxx14, ROOT-ubuntu16/rtcxxmod, ROOT-ubuntu18.04-i386/cxx14, mac1014/cxx17, windows10/cxx14
How to customize builds

@linev
Copy link
Member Author

linev commented Oct 29, 2019

@etejedor
Now it works for me.
But there is another problem.

c.NotebookApp.ip = '*'

This does not work on my machine.
If I replace address by hand to 127.0.0.1, then notebook starts and I can verify my changes.
Should we provide something like:

root --notebook --ip=localhost

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora30/cxx14.
See console output.

Warnings:

  • include/tbb/concurrent_hash_map.h:127:51: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘class tbb::interface5::internal::hash_map_base’ with no trivial copy-assignment; use value-initialization instead [-Wclass-memaccess]
  • include/tbb/concurrent_hash_map.h:127:51: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘class tbb::interface5::internal::hash_map_base’ with no trivial copy-assignment; use value-initialization instead [-Wclass-memaccess]

@etejedor
Copy link
Contributor

The NotebookApp.ip = '*' failure is a bug in older versions of Jupyter:
jupyter/notebook#4139
Moving to a new version should fix the issue.

@linev
Copy link
Member Author

linev commented Oct 30, 2019

Moving to a new version should fix the issue.

I have:

% jupyter-notebook --version                                                                                                                                                            5.7.8

Is it old?

@linev
Copy link
Member Author

linev commented Oct 30, 2019

Seems to be, fix in jupyter is not backported to version 5.7.x and there is still no 5.8 release.
I guess, we should provide some reasonable solution for users like me :)

@linev
Copy link
Member Author

linev commented Oct 30, 2019

@etejedor I could propose PR with "--ip=value" argument (and may be some others).

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos7-multicore/default, ROOT-fedora27/noimt, ROOT-fedora29/python3, ROOT-fedora30/cxx14, ROOT-ubuntu16/rtcxxmod, ROOT-ubuntu18.04-i386/cxx14, mac1014/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on mac1014/cxx17.
See console output.

Errors:

  • CMake Error at cmake/modules/SearchInstalledSoftware.cmake:505 (message):
  • CMake Error at /build/jenkins/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:941 (message):

@linev
Copy link
Member Author

linev commented Oct 31, 2019

@etejedor Finally, this PR.
It will work for any ROOT installation, while any ROOT ships correspondent JSROOT version.
Use of central web-server is dangerous, while not all ROOT versions can be covered by same JSROOT.

Unfortunately, I cannot make it optional - this will require more fundamental changes.

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos7-multicore/default, ROOT-fedora27/noimt, ROOT-fedora29/python3, ROOT-fedora30/cxx14, ROOT-ubuntu16/rtcxxmod, ROOT-ubuntu18.04-i386/cxx14, mac1014/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu18.04-i386/cxx14.
See console output.

Warnings:

  • /home/sftnight/build/workspace/root-pullrequests-build/root/core/zstd/src/ZipZSTD.cxx:23:44: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  • /home/sftnight/build/workspace/root-pullrequests-build/root/tree/tree/src/TLeaf.cxx:180:93: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘unsigned int’ [-Wformat=]
  • Warning: Unused class rule: TMVA::Experimental::RBDT<TMVA::Experimental::BranchlessJittedForest<float>>
  • Warning: Unused class rule: TMVA::Experimental::RBDT<TMVA::Experimental::BranchlessForest<float>>

Copy link
Contributor

@etejedor etejedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @linev I think we are good to go, so please go ahead with the merge whenever it suits you.

@linev linev merged commit a3d00a5 into root-project:master Nov 14, 2019
@linev linev deleted the jupyter_static branch November 14, 2019 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants