BHoM / MachineLearning_Toolkit

Machine Learning for the BHoM
GNU Lesser General Public License v3.0
1 stars 1 forks source link

MachineLearning_Toolkit: Previous script not working after installer installation #42

Closed BingWangUS closed 4 years ago

BingWangUS commented 4 years ago

Description:

Having this issue after a clean install from installer.

  1. Using Alphainstaller
  2. Compile Python toolkit
  3. Install Python toolkit
  4. Compile ML toolkit
  5. Install ML toolkit
  6. Open the test script here MachineLearning#15-ScoreMethod_Testing.zip

image

Steps to reproduce:

Expected behaviour:

Test file(s):

epignatelli commented 4 years ago

Currently, python files are not copied correctly to the BHoM folder.

We have an open pr that solves that - https://github.com/BHoM/BHoM_Installer/pull/82 - keep an eye for that to be merged!

BingWangUS commented 4 years ago

Currently, python files are not copied correctly to the BHoM folder.

We have an open pr that solves that - BHoM/BHoM_Installer#82 - keep an eye for that to be merged!

Hi Eduardo, after installer I also compile so those files are there. I guess this is not the cause but will keep an eye on the installer and test and report back.

epignatelli commented 4 years ago

I followed your procedure and added a restart of Rhinoceros as a point 5b. All working ok:

image

Di you restart the UI after installing the ML Toolkit?

BingWangUS commented 4 years ago

Retesting this, confirm the script can work in Rhino 5 but not Rhino 6.

epignatelli commented 4 years ago

Ok, thanks Bing - so I'll close this as duplicate of #31

BingWangUS commented 4 years ago

I can confirm the issue is caused by pandas - even though the previous scripts is not using pandas, it is importing all python files when initialising python, which will import pandas and then cause issue in Rhino 6.

Removing the following lines in Compute__init__.py will make the previous script back to work, but of course, will cause trouble to python charts functionality. from .ClimateCharts import Diurnal from .ClimateCharts import UTCI from .ClimateCharts import Frequency from .ClimateCharts import Heatmap

So maybe only import the py scripts when needed could be a solution?