sassoftware / python-dlpy

The SAS Deep Learning Python (DLPy) package provides the high-level Python APIs to deep learning methods in SAS Visual Data Mining and Machine Learning. It allows users to build deep learning models using friendly Keras-like APIs.
Apache License 2.0
224 stars 131 forks source link

import dlpy using "is" syntax instead of "==" #397

Closed elebersole closed 1 year ago

elebersole commented 1 year ago

Using SWAT with dlpy and running this code from an old program:

import swat portnumber=30570 sess = swat.CAS('server.demo.sas.com', portnumber, 'Student', 'Metadata0', caslib="casuser") sess import dlpy from dlpy import Model, Sequential from dlpy import images, ImageTable from dlpy import Sequential, Sequential from dlpy import layers, Layer, InputLayer, Conv2d, Pooling, Dense, Recurrent, BN, Res, Concat, Proj, OutputLayer from dlpy.applications import * dlpy.version

I received the following error: /opt/conda/lib/python3.10/site-packages/dlpy/utils.py:2739: SyntaxWarning: "is" with a literal. Did you mean "=="? if task is 'image_classification':

elebersole commented 1 year ago
2023-05-30
dxq77dxq commented 1 year ago

Hi Beth, MutableMapping is moved to collections.abc and is fixed by https://github.com/sassoftware/python-dlpy/pull/389. Please update your dlpy version so this fix is caught.

myuser-git commented 1 year ago

I have the same issue with Python 3.10 and dlpy 1.2.0, which I believe is the latest version for dlpy. Does #389 refer to it?

dxq77dxq commented 1 year ago

I have the same issue with Python 3.10 and dlpy 1.2.0, which I believe is the latest version for dlpy. Does #389 refer to it?

Please install the dev version: pip install git+https://github.com/sassoftware/python-dlpy.git