gmlc-dispatches / dispatches

Primary repository for distributed dispatches software tools
https://dispatches.readthedocs.io/
Other
12 stars 34 forks source link

Deprecation Warnings when TEAL module is imported. #173

Closed radhakrishnatg closed 1 year ago

radhakrishnatg commented 1 year ago

@lbianchi-lbl @joshua-cogliati-inl I get the following deprecation warnings when I import TEAL. I'm checking if these warnings cause any issue with Teal/Raven usage. But this needs to fixed in the future.

(teal-int-test) C:\Users\Radhakrishna>ipython
Python 3.8.0 | packaged by conda-forge | (default, Nov 22 2019, 19:04:36) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.34.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import TEAL
C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\matplotlib\__init__.py:169: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if LooseVersion(module.__version__) < minver:
C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\setuptools\_distutils\version.py:346: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  other = LooseVersion(other)
PySide2/__init__.py: Unable to import shiboken2 from C:\Users\Radhakrishna\.conda\envs\teal-int-test\Scripts\ipython.exe, C:\Users\Radhakrishna\.conda\envs\teal-int-test\python38.zip, C:\Users\Radhakrishna\.conda\envs\teal-int-test\DLLs, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib, C:\Users\Radhakrishna\.conda\envs\teal-int-test, , C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages, c:\users\radhakrishna\desktop\code_repositories\dispatches, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\win32, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\win32\lib, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\Pythonwin, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\IPython\extensions, C:\Users\Radhakrishna\.ipython
C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\xarray\core\pycompat.py:37: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  duck_array_version = LooseVersion("0.0.0")
C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\setuptools\_distutils\version.py:346: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  other = LooseVersion(other)
C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\xarray\core\npcompat.py:89: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if LooseVersion(np.__version__) >= "1.20.0":
C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\xarray\core\pdcompat.py:45: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if LooseVersion(pd.__version__) < "0.25.0":
PluginFactory: No installed plugins detected.
PySide2/__init__.py: Unable to import shiboken2 from C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\ray\thirdparty_files, C:\Users\Radhakrishna\.conda\envs\teal-int-test\Scripts\ipython.exe, C:\Users\Radhakrishna\.conda\envs\teal-int-test\python38.zip, C:\Users\Radhakrishna\.conda\envs\teal-int-test\DLLs, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib, C:\Users\Radhakrishna\.conda\envs\teal-int-test, , C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages, c:\users\radhakrishna\desktop\code_repositories\dispatches, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\win32, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\win32\lib, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\Pythonwin, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\IPython\extensions, C:\Users\Radhakrishna\.ipython
PySide2/__init__.py: Unable to import shiboken2 from C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\ray\thirdparty_files, C:\Users\Radhakrishna\.conda\envs\teal-int-test\Scripts\ipython.exe, C:\Users\Radhakrishna\.conda\envs\teal-int-test\python38.zip, C:\Users\Radhakrishna\.conda\envs\teal-int-test\DLLs, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib, C:\Users\Radhakrishna\.conda\envs\teal-int-test, , C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages, c:\users\radhakrishna\desktop\code_repositories\dispatches, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\win32, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\win32\lib, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\Pythonwin, C:\Users\Radhakrishna\.conda\envs\teal-int-test\lib\site-packages\IPython\extensions, C:\Users\Radhakrishna\.ipython

In [2]:
joshua-cogliati-inl commented 1 year ago

Hm, I might need to try and see if I can upgrade the versions of the libraries that RAVEN uses (like matplotlib and xarray).

joshua-cogliati-inl commented 1 year ago

Note for self: Need to update matplotlib to >= 3.5 and xarray >= 0.21

joshua-cogliati-inl commented 1 year ago

Another pull request for RAVEN that is working on this: https://github.com/idaholab/raven/pull/2064

joshua-cogliati-inl commented 1 year ago

I have created fixes for this for RAVEN, but the next RAVEN release is scheduled for May, so until then these warnings will continued to be displayed for a while. I will create a release candidate PIP package in a week or two.

joshua-cogliati-inl commented 1 year ago

I think this is fixed in a prerelease. (This issue should remain open until it is fixed in a release)

Install commands (create virtual environment, and install TEAL):

python3.8 -m venv test
source test/bin/activate
python3.8 -m pip  install --extra-index-url https://test.pypi.org/simple/ teal_ravenframework==0.3.1rc1
 python3.8
Python 3.8.16 (default, Dec  7 2022, 00:00:00) 
[GCC 12.2.1 20221121 (Red Hat 12.2.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import TEAL
>>> 
lbianchi-lbl commented 1 year ago

New releases for RAVEN and TEAL are planned for the coming month. Pre-releases are already available for testing as per @joshua-cogliati-inl's previous comment.

ksbeattie commented 1 year ago

@joshua-cogliati-inl says the next release of RAVEN & TEAL will be coming in the next few weeks.

joshua-cogliati-inl commented 1 year ago

The new release of RAVEN should happen this week.

joshua-cogliati-inl commented 1 year ago

The new release of RAVEN has happened, and I am testing new RAVEN and TEAL pip packages.

lbianchi-lbl commented 1 year ago

The new release of RAVEN has happened, and I am testing new RAVEN and TEAL pip packages.

Great, thanks for the update @joshua-cogliati-inl.

joshua-cogliati-inl commented 1 year ago

The new teal and ravenpackages are up at testpypi. Unless someone discovers a problem with them, I plan on uploading them to pypi tomorrow.

python -m pip install teal-ravenframework==0.4 --extra-index-url https://test.pypi.org/simple/
joshua-cogliati-inl commented 1 year ago

@lbianchi-lbl I have uploaded teal-ravenframework==0.4 and raven-framework==2.3 to pypi.

lbianchi-lbl commented 1 year ago

For future reference: