Code Monkey home page Code Monkey logo

Comments (11)

takluyver avatar takluyver commented on June 12, 2024

It looks like all the warnings are coming from jupyter, so there's probably nothing for pyemma to do. I think we were over-eager with issuing deprecation warnings.

from jupyter_core.

stefdoerr avatar stefdoerr commented on June 12, 2024

Okay, I just thought that since importing jupyter_core did not throw any messages it might be related to pyemma, but yes they all come from the core code.
If you need it I can provide you the full list of warnings

from jupyter_core.

Carreau avatar Carreau commented on June 12, 2024

still unsure why it would do that at pyemma import...

from jupyter_core.

Carreau avatar Carreau commented on June 12, 2024

Hum, PyEmme is definitively inderectly maybe doing stuff it should not.

Traceback (most recent call last):
  File "/Users/bussonniermatthias/dev/ipython/IPython/core/interactiveshell.py", line 2885, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-1-e542aa3daeae>", line 1, in <module>
    import pyemma
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/site-packages/pyemma/__init__.py", line 28, in <module>
    from . import msm
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/site-packages/pyemma/msm/__init__.py", line 91, in <module>
    from msmtools import analysis, estimation, generation, dtraj, flux
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/site-packages/msmtools/__init__.py", line 41, in <module>
    from . import analysis
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/site-packages/msmtools/analysis/__init__.py", line 113, in <module>
    from .api import *
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/site-packages/msmtools/analysis/api.py", line 92, in <module>
    @shortcut('is_tmatrix')
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/site-packages/msmtools/util/annotators.py", line 155, in shortcut
    frame = inspect.stack()[1][0]
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/inspect.py", line 1464, in stack
    return getouterframes(sys._getframe(1), context)
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/inspect.py", line 1441, in getouterframes
    frameinfo = (frame,) + getframeinfo(frame, context)
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/inspect.py", line 1414, in getframeinfo
    lines, lnum = findsource(frame)
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/inspect.py", line 756, in findsource
    module = getmodule(object, file)
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/inspect.py", line 709, in getmodule
    if ismodule(module) and hasattr(module, '__file__'):
  File "/Users/bussonniermatthias/dev/ipython/IPython/utils/shimmodule.py", line 90, in __getattr__
    return import_item(name)
  File "/Users/bussonniermatthias/dev/ipython/IPython/utils/importstring.py", line 31, in import_item
    module = __import__(package, fromlist=[obj])
  File "/Users/bussonniermatthias/dev/notebook/notebook/__init__.py", line 25, in <module>
    from .nbextensions import install_nbextension
  File "/Users/bussonniermatthias/dev/notebook/notebook/nbextensions.py", line 227, in <module>
    from jupyter_core.application import JupyterApp
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 61, in <module>
    class JupyterApp(Application):
  File "/Users/bussonniermatthias/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 105, in JupyterApp
    raise DeprecationWarning('Foo')
DeprecationWarning: Foo

It also for some reason disable warnigns filters:

In [1]: import warnings

In [2]: warnings.simplefilter('error')

In [3]: import pyemma
/Users/bussonniermatthias/anaconda3/lib/python3.5/site-packages/mdtraj/formats/hdf5.py:91: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead
  setattr(wrapper, '__argspec__', inspect.getargspec(f))
/Users/bussonniermatthias/anaconda3/lib/python3.5/site-packages/mdtraj/formats/hdf5.py:91: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead
<... no execeptions>

And most of errors are not from jupyter_core (mdtraj/formats/hdf5.py:91:),

The reason is that the hacks provided by msmtools are so horrible (well, they do what they have to do), that they end up importing our shims, which raise deprecation warnings.

from jupyter_core.

stefdoerr avatar stefdoerr commented on June 12, 2024

@franknoe @marscher Can you check this?

from jupyter_core.

franknoe avatar franknoe commented on June 12, 2024

@Carreau , could you be more specific which msmtools hacks are horrible / what should be avoided?

from jupyter_core.

takluyver avatar takluyver commented on June 12, 2024

I think he's referring to the stack inspection in msmtools.util.annotators. Looking up the caller is generally a dubious thing to do, but it does mostly work. However, we monkeypatch something in inspect to work around a critical bug, so it's triggering some of our code, and something is doing something odd with warning filters that makes normally hidden warnings visible.

I'll try to dig into this a bit more to understand what's going on.

from jupyter_core.

Carreau avatar Carreau commented on June 12, 2024

could you be more specific which msmtools hacks are horrible / what should be avoided

the "horrible" was partially written in a sarcastic way, but yes I am referring to looking up the caller.

from jupyter_core.

marscher avatar marscher commented on June 12, 2024

Thanks a lot for the explanation! I think the warnings filter got mistreated and finally fixed by mdtraj/mdtraj#1030. So we can close this one now.

from jupyter_core.

franknoe avatar franknoe commented on June 12, 2024

I agree.

Am 09/02/16 um 17:55 schrieb Martin K. Scherer:

Thanks a lot for the explanation! I think the warnings filter got
mistreated and finally fixed by mdtraj/mdtraj#1030
mdtraj/mdtraj#1030. So we can close this one
now.


Reply to this email directly or view it on GitHub
#71 (comment).


Prof. Dr. Frank Noe
Head of Computational Molecular Biology group
Freie Universitaet Berlin

Phone: (+49) (0)30 838 75354
Web: research.franknoe.de

Mail: Arnimallee 6, 14195 Berlin, Germany

from jupyter_core.

takluyver avatar takluyver commented on June 12, 2024

Great, thanks!

from jupyter_core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.