systemml-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Francis Roy (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SYSTEMML-2137) mllearn/estimators.py cannot be imported in Python 3
Date Thu, 08 Feb 2018 16:34:00 GMT
Jean-Francis Roy created SYSTEMML-2137:
------------------------------------------

             Summary: mllearn/estimators.py cannot be imported in Python 3
                 Key: SYSTEMML-2137
                 URL: https://issues.apache.org/jira/browse/SYSTEMML-2137
             Project: SystemML
          Issue Type: Bug
    Affects Versions: SystemML 1.0.0
            Reporter: Jean-Francis Roy


When importing an algorithm from `systemml.mllearn` in Python 3, I get a syntax error, reporting
that "import * is only allowed at module level". In Python 2, importing * in a function resulted
in a warning, but the behavior changed in Python 3.

Steps to reproduce:
 * `from systemml.mllearn import LogisticRegression`

 

Result:

File "/usr/local/lib/python3.6/dist-packages/systemml/mllearn/estimators.py", line 887
 def __init__(self, sparkSession, keras_model, input_shape, transferUsingDF=False, weights=None,
labels=None):
 ^
SyntaxError: import * only allowed at module level

 

A simple fix to this issue is simply to import variables/functions individually.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message