Predix_Logo
  • Categories
    • Questions
    • Predix | Updates
      • Pricing
      • Product
    • Deloitte - Private
    • How-To
    • Accenture-Private
  • Explore
    • Topics
    • Questions
    • Articles
    • Feedback or Feature Requests
  • Sign in
  • Home /
  • Questions /
avatar image
0
Question by Sathya · Jun 01, 2020 at 03:38 AM · analytics-catalog-service

Can we still deploy trained Analytics in Python 2

We have many analytics trained & developed in Python 2.7 version. Can we continue to deploy them in the Analytics Catalog using UI.

I tried to deploy one today, deployment got completed (though there was an error: ModuleNotFoundError: No module named 'pip.req'), i got an error while executing the analytics:

" Execution of analytic Tower15-OptimalPath-to-GoldenEff-DEMO2 returned an error. Execution of analytic Tower15-OptimalPath-to-GoldenEff-DEMO2 returned the error 400, Unable to execute analytic - class [Tower_OptmlPath_to_GoldenEff.tataChemical_PathToGoldnEff], method [get_data]. Cause: ModuleNotFoundError: No module named 'PredixModel_Tower_OptmlPath_to_GoldenEff' File "/home/vcap/app/Tower_OptmlPath_to_GoldenEff/init.py", line 1, in from PredixModel_Tower_OptmlPath_to_GoldenEff import tataChemical_PathToGoldnEff "

Catalog: https://dss-qa-new.predix-analytics-ui.run.aws-usw02-pr.ice.predix.io/ Name: Tower15-OptimalPath-to-GoldenEff-DEMO2 Analytic ID: 91ff1a5c-a756-4ee1-9258-81f20cc99114

Comment
Add comment
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by Erwin Cabral · Jun 01, 2020 at 01:48 PM

@Sathya ,

Python 2.x has reached its End-of-Life starting January 2020. Late last year, we started seeing a lot of issues reported by customers during analytic builds for Python 2.7 (especially where the version is not specified in config.json). The python builds will pull the latest version which is no longer compatible with the rest of the libraries because they moved entirely to Python 3.x. These issues came up and the only proposed solution was to update their code to make it compatible to Python3.x.
The list of python libraries who moved completely to Python3 can be found in the page : https://python3statement.org/

Please refer to the link below for fixing code compatibility with Python3 : https://python-future.org/compatible_idioms.html

The existing Python 2.7 analytics currently deployed will continue to work as long as it is not re-deployed. When a new or existing analytic is deployed, it automatically uses Python 3.6.5 as its runtime and this is probably what’s happening in your case.

Based on just looking at the error message you sent, the issue appears to be related on how the relative paths differ from Python2 to Python3. Please refer to this link for details: https://python-future.org/compatible_idioms.html#imports-relative-to-a-package

Comment
Add comment · Show 3 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sathya · Jun 08, 2020 at 04:35 AM 0
Share

@Erwin Cabral , Thanks much for your feedback. I have updated my analytic - now trained in Py3 and tried to deploy. I am facing an issue with Numpy package. In my training environment i have Numpy 1.18.1. So I mentioned the same in the config.json and deployed. But i can see the build pack only installs Numpy thats is <=1.15.1 (attached screenshot Numpy_version_Issue.png). Ideally the config.json should dictate the version of the library to be installed, but thats not happening in this case.

I believe because of the issue am getting an error while executing the analytic (screenshot: Analytic Execution errror) -- ModuleNotFoundError: No module named 'numpy.random._pickle'

Catalog URL: https://dss-qa-new.predix-analytics-ui.run.aws-usw02-pr.ice.predix.io/analytics/view/234fe7c1-605b-4c9d-84b9-89a361a5bfba Analytic ID: 234fe7c1-605b-4c9d-84b9-89a361a5bfba

Please share your feedback. Thanks in advance.alt text

analytic-execution-error.jpg (250.9 kB)
numpy-version-issue.png (128.1 kB)
avatar image Sathya · Jul 01, 2020 at 12:01 AM 0
Share

Hi @Erwin Cabral, Can you please share your feedback on the comment i added on 8th Jun 2020? Thanks in advance

avatar image Erwin Cabral Sathya · Jul 07, 2020 at 02:06 PM 0
Share

Hi @Sathya , We have seen the issue and have pushed the latest bug fix in production US-West last week. Can you try again?

Follow this Question

Answers Answers and Comments

86 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

unable to invoke "text exploration" analytic 1 Answer

Analytics Catalog service giving Jedis connection error 1 Answer

Confirmation of Analytics V2 model flow and About Analytics Framework service 2 Answers

Is LP Solver service available on Predix 1 Answer

500 Error while Analytic Execution. 1 Answer

GE Monogram
  • Legal
  • Cookies
  • Forum Terms
  • Contact Us
  • Copyright © 2017 General Electric Company. All rights reserved.


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Submit your feedback or feature request
  • Categories
  • Questions
  • Predix | Updates
    • Pricing
    • Product
  • Deloitte - Private
  • How-To
  • Accenture-Private
  • Explore
  • Topics
  • Questions
  • Articles
  • Feedback or Feature Requests