gykovacs / rabbit_ct_weights

Multi-atlas based weight estimation for rabbits from CT images.
3 stars 2 forks source link

No module named 'maweight.mltoolkit.automl' #1

Open Caoxiaoyao299 opened 2 years ago

Caoxiaoyao299 commented 2 years ago

Excuse me, Mr. Gyorgy Kovacs,I was using your Github code to reproduce the paper, the following problems were encountered:

from maweight.mltoolkit.automl import R2_score, RMSE_score

ModuleNotFoundError: No module named 'maweight.mltoolkit.automl'

Could you please help me to answer questions?

gykovacs commented 2 years ago

Hi @AiDaoZuiMei, thank you for raising the issue. I look into it. Did you follow the instructions on the README page, and are you sure the package is installed into the same virtual environment where you execute the notebooks?

Caoxiaoyao299 commented 2 years ago

Sorry to bother you again, Sir@gykovacs.I reviewed my code according to what you said.It is true that the maweight module is not imported into the project.But I got the following error in the 001_training.ipynb of debugging

Objective KNNR_Objective: Traceback (most recent call last): File "E:/Pycharm/rabbit_ct_weights-master/001.py", line 81, in <module> results.append(model_selection(mld_features, mld_target, dataset='mld', type='all')) File "E:\Pycharm\rabbit_ct_weights-master\maweight\_maweight.py", line 546, in model_selection results['model_selection_score']= ms.select()['score'] File "E:\Pycharm\rabbit_ct_weights-master\maweight\mltoolkit\automl\_ModelSelection.py", line 76, in select self.random_state, cache_path, self.verbosity) File "E:\Pycharm\rabbit_ct_weights-master\maweight\mltoolkit\automl\_regressors.py", line 160, in __init__ self._default_features_parameter_space= super().get_default_parameter_space() File "E:\Pycharm\rabbit_ct_weights-master\maweight\mltoolkit\automl\_ModelSelectionObjective.py", line 365, in get_default_parameter_space return BinaryVectorParameter(len(self.X[0]), n_init=n_init, random_state=self._random_state_init, disabled=self.disable_feature_selection) IndexError: index 0 is out of bounds for axis 0 with size 0

I searched for a long time but could not find a solution.Could you please help me solve this problem?Thanks again.

gykovacs commented 2 years ago

Hi @AiDaoZuiMei, sure, I look into it. First of all, some questions:

1) As far as I see from the error, you are running the file 001.py. Is this the 001_training notebook converted to a Python script? 2) Did you successfully run the 000_extract_training_features notebook? 3) Could you please share a couple of lines from the mld_training_features*.csv that you can find in the data directory?

Caoxiaoyao299 commented 2 years ago

Yes Sir, this is the result of converting ipynb files to PY files using the Pycharm compiler and running it. Also, I have run 000_extract_training_features.py file correctly following the steps in Github. Attached is mld_training_features *.csv Could you please help me to see where the mistake is ? 

------------------ 原始邮件 ------------------ 发件人: "gykovacs/rabbit_ct_weights" @.>; 发送时间: 2022年6月17日(星期五) 中午1:42 @.>; @.**@.>; 主题: Re: [gykovacs/rabbit_ct_weights] No module named 'maweight.mltoolkit.automl' (Issue #1)

Hi @AiDaoZuiMei, sure, I look into it. First of all, some questions:

As far as I see from the error, you are running the file 001.py. Is this the 001_training notebook converted to a Python script?

Did you successfully run the 000_extract_training_features notebook?

Could you please share a couple of lines from the mld_training_features*.csv that you can find in the data directory?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

gykovacs commented 2 years ago

Thank you! I just cant find the attachment!

Caoxiaoyao299 commented 2 years ago

I'm sorry Sir, maybe I uploaded it incorrectly.Below is a partial screenshot of the MLD Training features.csv file.Please have a look. Below is the attachment location I added, maybe the operation of adding just now is wrong.

------------------ 原始邮件 ------------------ 发件人: "gykovacs/rabbit_ct_weights" @.>; 发送时间: 2022年6月17日(星期五) 下午3:00 @.>; @.**@.>; 主题: Re: [gykovacs/rabbit_ct_weights] No module named 'maweight.mltoolkit.automl' (Issue #1)

Thank you! I just cant find the attachment!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

gykovacs commented 2 years ago

Yeah, I still cannot see any screenshot or link to attachement. Could you please just copy here, into a comment the first 5 lines of the csv?

Caoxiaoyao299 commented 2 years ago

OK,sir.Here are the first five lines of the CSV file.

               num-203a-mld.nii-0.500000   sum-203a-mld.nii-0.500000   mean-203a-mld.nii-0.500000   std-203a-mld.nii-0.500000   skew-203a-mld.nii-0.500000   kurt-203a-mld.nii-0.500000   hist-0-203a-mld.nii-0.500000   hist-1-203a-mld.nii-0.500000   hist-2-203a-mld.nii-0.500000   hist-3-203a-mld.nii-0.500000   hist-4-203a-mld.nii-0.500000   hist-5-203a-mld.nii-0.500000   hist-6-203a-mld.nii-0.500000   hist-7-203a-mld.nii-0.500000   hist-8-203a-mld.nii-0.500000   hist-9-203a-mld.nii-0.500000   hist-10-203a-mld.nii-0.500000   hist-11-203a-mld.nii-0.500000   hist-12-203a-mld.nii-0.500000   hist-13-203a-mld.nii-0.500000   hist-14-203a-mld.nii-0.500000   hist-15-203a-mld.nii-0.500000   hist-16-203a-mld.nii-0.500000   hist-17-203a-mld.nii-0.500000   hist-18-203a-mld.nii-0.500000   hist-19-203a-mld.nii-0.500000   num-203k-mld.nii-0.500000   sum-203k-mld.nii-0.500000   mean-203k-mld.nii-0.500000   std-203k-mld.nii-0.500000   skew-203k-mld.nii-0.500000   kurt-203k-mld.nii-0.500000   hist-0-203k-mld.nii-0.500000   hist-1-203k-mld.nii-0.500000   hist-2-203k-mld.nii-0.500000   hist-3-203k-mld.nii-0.500000   hist-4-203k-mld.nii-0.500000   hist-5-203k-mld.nii-0.500000   hist-6-203k-mld.nii-0.500000   hist-7-203k-mld.nii-0.500000   hist-8-203k-mld.nii-0.500000   hist-9-203k-mld.nii-0.500000   hist-10-203k-mld.nii-0.500000   hist-11-203k-mld.nii-0.500000   hist-12-203k-mld.nii-0.500000   hist-13-203k-mld.nii-0.500000   hist-14-203k-mld.nii-0.500000   hist-15-203k-mld.nii-0.500000   hist-16-203k-mld.nii-0.500000   hist-17-203k-mld.nii-0.500000   hist-18-203k-mld.nii-0.500000   hist-19-203k-mld.nii-0.500000   num-204f-mld.nii-0.500000   sum-204f-mld.nii-0.500000   mean-204f-mld.nii-0.500000   std-204f-mld.nii-0.500000   skew-204f-mld.nii-0.500000   kurt-204f-mld.nii-0.500000   hist-0-204f-mld.nii-0.500000   hist-1-204f-mld.nii-0.500000   hist-2-204f-mld.nii-0.500000   hist-3-204f-mld.nii-0.500000   hist-4-204f-mld.nii-0.500000   hist-5-204f-mld.nii-0.500000   hist-6-204f-mld.nii-0.500000   hist-7-204f-mld.nii-0.500000   hist-8-204f-mld.nii-0.500000   hist-9-204f-mld.nii-0.500000   hist-10-204f-mld.nii-0.500000   hist-11-204f-mld.nii-0.500000   hist-12-204f-mld.nii-0.500000   hist-13-204f-mld.nii-0.500000   hist-14-204f-mld.nii-0.500000   hist-15-204f-mld.nii-0.500000   hist-16-204f-mld.nii-0.500000   hist-17-204f-mld.nii-0.500000   hist-18-204f-mld.nii-0.500000   hist-19-204f-mld.nii-0.500000   num-206k-mld.nii-0.500000   sum-206k-mld.nii-0.500000   mean-206k-mld.nii-0.500000   std-206k-mld.nii-0.500000   skew-206k-mld.nii-0.500000   kurt-206k-mld.nii-0.500000   hist-0-206k-mld.nii-0.500000   hist-1-206k-mld.nii-0.500000   hist-2-206k-mld.nii-0.500000   hist-3-206k-mld.nii-0.500000   hist-4-206k-mld.nii-0.500000   hist-5-206k-mld.nii-0.500000   hist-6-206k-mld.nii-0.500000   hist-7-206k-mld.nii-0.500000   hist-8-206k-mld.nii-0.500000   hist-9-206k-mld.nii-0.500000   hist-10-206k-mld.nii-0.500000   hist-11-206k-mld.nii-0.500000   hist-12-206k-mld.nii-0.500000   hist-13-206k-mld.nii-0.500000   hist-14-206k-mld.nii-0.500000   hist-15-206k-mld.nii-0.500000   hist-16-206k-mld.nii-0.500000   hist-17-206k-mld.nii-0.500000   hist-18-206k-mld.nii-0.500000   hist-19-206k-mld.nii-0.500000   num-208f-mld.nii-0.500000   sum-208f-mld.nii-0.500000   mean-208f-mld.nii-0.500000   std-208f-mld.nii-0.500000   skew-208f-mld.nii-0.500000   kurt-208f-mld.nii-0.500000   hist-0-208f-mld.nii-0.500000   hist-1-208f-mld.nii-0.500000   hist-2-208f-mld.nii-0.500000   hist-3-208f-mld.nii-0.500000   hist-4-208f-mld.nii-0.500000   hist-5-208f-mld.nii-0.500000   hist-6-208f-mld.nii-0.500000   hist-7-208f-mld.nii-0.500000   hist-8-208f-mld.nii-0.500000   hist-9-208f-mld.nii-0.500000   hist-10-208f-mld.nii-0.500000   hist-11-208f-mld.nii-0.500000   hist-12-208f-mld.nii-0.500000   hist-13-208f-mld.nii-0.500000   hist-14-208f-mld.nii-0.500000   hist-15-208f-mld.nii-0.500000   hist-16-208f-mld.nii-0.500000   hist-17-208f-mld.nii-0.500000   hist-18-208f-mld.nii-0.500000   hist-19-208f-mld.nii-0.500000   num-0.500000-mean_mask   sum-0.500000-mean_mask   mean-0.500000-mean_mask   std-0.500000-mean_mask   skew-0.500000-mean_mask   kurt-0.500000-mean_mask   hist-0-0.500000-mean_mask   hist-1-0.500000-mean_mask   hist-2-0.500000-mean_mask   hist-3-0.500000-mean_mask   hist-4-0.500000-mean_mask   hist-5-0.500000-mean_mask   hist-6-0.500000-mean_mask   hist-7-0.500000-mean_mask   hist-8-0.500000-mean_mask   hist-9-0.500000-mean_mask   hist-10-0.500000-mean_mask   hist-11-0.500000-mean_mask   hist-12-0.500000-mean_mask   hist-13-0.500000-mean_mask   hist-14-0.500000-mean_mask   hist-15-0.500000-mean_mask   hist-16-0.500000-mean_mask   hist-17-0.500000-mean_mask   hist-18-0.500000-mean_mask   hist-19-0.500000-mean_mask   filename  
 103341   5156553   49.898422   65.96312   -3.0231239   38.22301192   1155   1898   3701   8258   18361   25744   20722   9847   3694   1211   584   348   256   210   186   178   138   119   118   120   102546   4686043   45.69698   60.67942   -5.2673   47.45897   1383   2424   4435   8860   18239   25011   19950   9456   3529   1109   534   296   211   167   148   134   110   93   85   84   103098   4816806   46.72065   72.49657   -4.44116   41.43695   1127   1895   3670   8193   18190   25447   20423   9851   3724   1226   630   345   233   197   170   170   131   121   117   130   101542   5046251   49.69619   57.64552   -3.50009   47.68002   1315   2073   3892   8442   18154   25220   20065   9520   3538   1132   523   309   207   177   159   147   106   96   99   110   109225   5617809   51.43336   43.21137   -2.11455   43.68314   1483   2590   4910   9989   19840   26690   21195   10040   3762   1186   591   347   237   199   175   156   130   121   111   123   102243   5202938   50.88796   44.67059   -2.65713   35.12607   1248   2039   3883   8536   18540   25750   20616   9805   3651   1167   559   310   212   175   155   135   106   91   89   95   data\dissected\037.mnc-k.nii  
 117058   6019671   51.424686   47.170963   -4.5201947   48.999451   1237   1863   3383   6950   16905   31730   29109   12647   3821   1265   591   333   260   179   165   148   131   109   84   83   116731   5871419   50.29871   52.01986   -4.57217   55.70803   1302   1954   3494   6963   16643   31130   28776   12644   3846   1258   565   290   247   155   121   123   96   96   85   82   117132   5297834   45.2296   70.26415   -3.95003   39.95218   1449   2072   3729   7370   16595   30177   27134   11440   3398   1092   479   266   228   178   138   137   126   109   104   110   116835   5646200   48.32627   48.07189   -4.80082   63.94241   1407   2120   3832   7449   16666   30246   28028   12185   3700   1182   491   245   203   142   114   112   95   80   63   75   122843   6676107   54.34666   47.27003   -0.51899   69.2207   1645   2391   4100   7670   17376   32113   29635   13083   4059   1377   630   340   259   204   152   153   143   139   99   111   116595   6141486   52.67366   37.09756   -2.40248   42.35875   1324   1986   3555   7104   16865   31377   28945   12665   3879   1266   543   280   221   155   121   127   94   98   75   77   data\dissected\038.mnc-a.nii  
 112396   5623599   50.033802   62.153625   -1.0604539   35.24361705   1759   2850   4575   7855   18388   33839   22142   6941   2602   1005   471   291   273   214   199   190   163   147   127   160   111169   5003566   45.00864   62.31139   -4.26255   44.47186   1904   3124   4906   8005   18293   33259   21817   6812   2546   947   403   242   213   174   151   132   114   100   84   111   109317   4825578   44.14298   65.92049   -5.32038   51.23478   1600   2472   4084   7310   17843   33337   21989   6971   2628   1027   453   275   238   188   155   147   127   97   91   119   112767   4867254   43.16204   62.50749   -4.66314   60.72208   2044   3255   5047   8130   18049   32964   21429   6652   2419   911   387   243   205   172   153   124   121   100   96   117   114203   5793980   50.73404   34.77713   -0.71045   36.71788   1946   3221   5185   8803   19805   34920   22453   6981   2592   1009   483   306   263   198   177   151   157   107   105   116   110521   5472711   49.51739   39.80446   -2.26719   38.00687   1849   3013   4807   7985   18450   33849   22240   7005   2641   1010   446   268   230   185   156   140   127   93   91   119   data\dissected\038.mnc-f.nii  
 118233   6136237   51.89953   56.336666   -3.2200713   48.13390213   1096   1643   2955   6354   15987   31680   29678   12993   4500   1479   745   411   274   193   152   153   139   116   95   70   120687   5868482   48.62563   59.4466   -5.40468   55.91849   1273   1874   3249   6712   16194   31827   29886   13235   4550   1497   771   395   224   153   130   121   103   89   70   63   123021   5844432   47.5076   69.02599   -3.37596   38.48645   1385   2040   3409   6887   16418   31908   29690   12868   4410   1401   673   390   252   178   134   134   119   115   89   70   117727   5986159   50.8478   47.42155   -4.72829   60.34724   1251   1912   3265   6557   15817   31168   29470   13074   4453   1457   763   381   231   159   117   104   91   76   58   51   130708   6855863   52.45175   45.64515   -4.63954   75.70906   1451   2224   3956   8113   18564   34706   31823   13981   4815   1573   792   441   272   203   157   129   122   110   91   83   120845   6347662   52.5273   39.3715   -2.70591   38.46533   1312   1909   3331   6877   16671   32385   30314   13378   4614   1507   744   387   222   147   109   117   98   89   77   45   data\dissected\038.mnc-k.nii  
 99407   4255737   42.81124   73.550934   -1.975244   27.26131618   1854   2531   3871   7576   17021   25770   17775   6623   1968   828   418   352   223   211   194   166   139   145   115   121   96586   4266366   44.17168   61.99785   -1.88778   30.5593   1948   2653   3987   7618   16725   25214   17333   6483   1975   826   416   317   199   175   168   135   137   108   97   103   99498   3508440   35.26141   71.33485   -3.54623   28.87435   2037   2728   4086   7671   16691   25000   17031   6200   1829   769   381   308   207   177   150   139   100   101   98   79   96364   4430055   45.9721   59.15792   -1.41359   33.8965   1775   2497   3907   7588   16833   25537   17476   6497   1932   810   412   307   216   184   184   149   124   124   119   114   102613   4598951   44.81841   44.89788   -0.36491   19.23616   2161   3055   4611   8526   17868   26383   18127   6821   2117   877   459   355   207   193   168   136   135   116   110   99   96896   4443878   45.86235   47.74648   -0.5031   22.30079   1896   2618   3990   7724   17070   25692   17675   6606   1970   848   409   315   210   186   160   134   122   105   102   95   data\dissected\039.mnc-a.nii  

------------------ 原始邮件 ------------------ 发件人: "gykovacs/rabbit_ct_weights" @.>; 发送时间: 2022年6月17日(星期五) 下午3:19 @.>; @.**@.>; 主题: Re: [gykovacs/rabbit_ct_weights] No module named 'maweight.mltoolkit.automl' (Issue #1)

Yeah, I still cannot see any screenshot or link to attachement. Could you please just copy here, into a comment the first 5 lines of the csv?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

gykovacs commented 2 years ago

Cool, thank you! So the problem is that the code was developed in Linux environment, where folders are separated by the character '/'. As far as I see, you run the code on Windows, which separates folders by the character '\'. Besides the error messages, this can be observed in the last columns of the csv files (the file paths). The problem is that unfortunately the splitting of filenames is hardcoded in the notebooks with the Linux character '/'.

The quick solution is to fix this in the notebooks, by replacing

mld_features['id']= mld_features['filename'].apply(lambda x: x.split('/')[-1][:-4])
hinds_features['id']= hinds_features['filename'].apply(lambda x: x.split('/')[-1][:-4])

by

mld_features['id']= mld_features['filename'].apply(lambda x: x.split('\')[-1][:-4])
hinds_features['id']= hinds_features['filename'].apply(lambda x: x.split('\')[-1][:-4])

or

mld_features['id']= mld_features['filename'].apply(lambda x: x.split(os.sep)[-1][:-4])
hinds_features['id']= hinds_features['filename'].apply(lambda x: x.split(os.sep)[-1][:-4])

If you find similar filename splits in other notebooks, apply the same logic to fix it.

I will also commit a fix soon to make it permanent in the repository.

Let me know if it works or you have any further issue!

Caoxiaoyao299 commented 2 years ago

Thank you very much indeed, Sir.At first I thought you were implementing this method in Windows. I have successfully run training in Windows system according to the first method  Change '/'  to '\'  you gave. And I'm going to debug it a little bit. If there are other problems that I cannot solve independently, I still hope to consult you. Thank you again for your help.

------------------ 原始邮件 ------------------ 发件人: "gykovacs/rabbit_ct_weights" @.>; 发送时间: 2022年6月17日(星期五) 下午3:40 @.>; @.**@.>; 主题: Re: [gykovacs/rabbit_ct_weights] No module named 'maweight.mltoolkit.automl' (Issue #1)

Cool, thank you! So the problem is that the code was developed in Linux environment, where folders are separated by the character '/'. As far as I see, you run the code on Windows, which separates folders by the character ''. Besides the error messages, this can be observed in the last columns of the csv files (the file paths). The problem is that unfortunately the splitting of filenames is hardcoded in the notebooks with the Linux character '/'.

The quick solution is to fix this in the notebooks, by replacing mld_features['id']= mld_features['filename'].apply(lambda x: x.split('/')[-1][:-4]) hinds_features['id']= hinds_features['filename'].apply(lambda x: x.split('/')[-1][:-4])

by mld_features['id']= mld_features['filename'].apply(lambda x: x.split('\')[-1][:-4]) hinds_features['id']= hinds_features['filename'].apply(lambda x: x.split('\')[-1][:-4])

or mld_features['id']= mld_features['filename'].apply(lambda x: x.split(os.sep)[-1][:-4]) hinds_features['id']= hinds_features['filename'].apply(lambda x: x.split(os.sep)[-1][:-4])

If you find similar filename splits in other notebooks, apply the same logic to fix it.

I will also commit a fix soon to make it permanent in the repository.

Let me know if it works or you have any further issue!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Caoxiaoyao299 commented 2 years ago

Sir, I have a new problem.When I run the following code for 001_training.py, The compiler encounters the following error, 'RecursionError: maximum recursion depth exceeded while calling a Python object', I learned that PyCharm defaults to a recursion depth of 1000, so I changed the depth to 10000 as follows, 'import sys sys.setrecursionlimit(10000)', However, the following error was reported after the operation, 'Process finished with exit code -1073741571 (0xC00000FD)', I also learned that the problem was probably caused by stack overflow due to recursive calls. But Pycharm doesn't seem to have a tail recursive optimization approach. So do you have any good methods to solve this problem? Below are the results.

Executables being used: E:\elastix-5.0.1-win64\elastix.exe E:\elastix-5.0.1-win64\transformix.exe ['203a' '203k' '204f' '206k' '208f'] Objective KNNR_Objective:  26%|███████████████████████                                                                 | 2093/8000 [06:54<17:56,  5.49it/s]i terations: 2093  26%|███████████████████████                                                                 | 2093/8000 [06:54<19:28,  5.05it/s]  Number of used features: 29 Used features: ['num-203a-mld.nii-0.500000', 'hist-4-203a-mld.nii-0.500000', 'hist-5-203a-mld.nii-0.500000', 'hist-6-203a-mld.nii- 0.500000', 'hist-13-203a-mld.nii-0.500000', 'num-203k-mld.nii-0.500000', 'hist-2-203k-mld.nii-0.500000', 'hist-6-203k-mld.nii-0.50 0000', 'hist-19-203k-mld.nii-0.500000', 'num-204f-mld.nii-0.500000', 'sum-204f-mld.nii-0.500000', 'hist-6-204f-mld.nii-0.500000',  'hist-15-204f-mld.nii-0.500000', 'sum-206k-mld.nii-0.500000', 'hist-6-206k-mld.nii-0.500000', 'hist-7-206k-mld.nii-0.500000', 'his t-13-206k-mld.nii-0.500000', 'hist-17-206k-mld.nii-0.500000', 'hist-3-208f-mld.nii-0.500000', 'hist-4-208f-mld.nii-0.500000', 'his t-13-208f-mld.nii-0.500000', 'hist-14-208f-mld.nii-0.500000', 'hist-15-208f-mld.nii-0.500000', 'hist-17-208f-mld.nii-0.500000', 'n um-0.500000-mean_mask', 'hist-3-0.500000-mean_mask', 'hist-5-0.500000-mean_mask', 'hist-16-0.500000-mean_mask', 'hist-19-0.500000- mean_mask'] Score: -0.7285551734681033 200it [00:00, 833.11it/s] 1 1 0.7351899682493281 Objective LinearRegression_Objective:  18%|███████████████▌                                                                        | 1412/8000 [01:56<02:21, 46.61it/s]i terations: 1416  18%|███████████████▌                                                                        | 1416/8000 [01:56<09:00, 12.17it/s]  Number of used features: 17 Used features: ['kurt-203a-mld.nii-0.500000', 'hist-1-203k-mld.nii-0.500000', 'hist-5-203k-mld.nii-0.500000', 'hist-10-203k-mld.ni i-0.500000', 'num-204f-mld.nii-0.500000', 'hist-11-204f-mld.nii-0.500000', 'hist-16-204f-mld.nii-0.500000', 'std-206k-mld.nii-0.50 0000', 'hist-0-206k-mld.nii-0.500000', 'hist-4-206k-mld.nii-0.500000', 'hist-11-206k-mld.nii-0.500000', 'hist-17-206k-mld.nii-0.50 0000', 'std-208f-mld.nii-0.500000', 'hist-1-208f-mld.nii-0.500000', 'hist-16-208f-mld.nii-0.500000', 'hist-5-0.500000-mean_mask',  'hist-6-0.500000-mean_mask'] Score: -0.8243560254133395 200it [00:00, 847.23it/s] 1 1 0.8256089076504818 Objective LassoRegression_Objective:  27%|███████████████████████▊                                                                | 2168/8000 [05:14<09:13, 10.55it/s]i terations: 2169  27%|███████████████████████▊                                                                | 2169/8000 [05:14<14:05,  6.90it/s]  Number of used features: 7 Used features: ['num-203a-mld.nii-0.500000', 'kurt-203a-mld.nii-0.500000', 'num-203k-mld.nii-0.500000', 'hist-19-203k-mld.nii-0.50 0000', 'std-206k-mld.nii-0.500000', 'hist-0-206k-mld.nii-0.500000', 'hist-15-0.500000-mean_mask'] Score: -0.7893280489817501 200it [00:00, 617.12it/s] 1 1 0.7901596046683195 Objective RidgeRegression_Objective:  28%|████████████████████████▍                                                               | 2227/8000 [04:53<06:06, 15.74it/s]i terations: 2228  28%|████████████████████████▌                                                               | 2228/8000 [04:53<12:40,  7.59it/s]  Number of used features: 21 Used features: ['skew-203a-mld.nii-0.500000', 'kurt-203a-mld.nii-0.500000', 'hist-4-203a-mld.nii-0.500000', 'hist-1-203k-mld.nii-0 .500000', 'hist-3-203k-mld.nii-0.500000', 'hist-5-203k-mld.nii-0.500000', 'num-204f-mld.nii-0.500000', 'hist-1-204f-mld.nii-0.5000 00', 'hist-6-204f-mld.nii-0.500000', 'hist-8-204f-mld.nii-0.500000', 'hist-16-204f-mld.nii-0.500000', 'std-206k-mld.nii-0.500000',  'hist-1-206k-mld.nii-0.500000', 'hist-3-206k-mld.nii-0.500000', 'hist-7-206k-mld.nii-0.500000', 'std-208f-mld.nii-0.500000', 'his t-0-208f-mld.nii-0.500000', 'hist-9-208f-mld.nii-0.500000', 'hist-16-208f-mld.nii-0.500000', 'hist-5-0.500000-mean_mask', 'hist-19 -0.500000-mean_mask'] Score: -0.8302722295050067 200it [00:00, 647.17it/s] 1 1 0.833015847950061 Objective PLSRegression_Objective:   0%|                                                                                           | 4/8000 [00:00<17:17,  7.71it/s] Process finished with exit code -1073741571 (0xC00000FD)

------------------ 原始邮件 ------------------ 发件人: "gykovacs/rabbit_ct_weights" @.>; 发送时间: 2022年6月17日(星期五) 下午3:40 @.>; @.**@.>; 主题: Re: [gykovacs/rabbit_ct_weights] No module named 'maweight.mltoolkit.automl' (Issue #1)

Cool, thank you! So the problem is that the code was developed in Linux environment, where folders are separated by the character '/'. As far as I see, you run the code on Windows, which separates folders by the character ''. Besides the error messages, this can be observed in the last columns of the csv files (the file paths). The problem is that unfortunately the splitting of filenames is hardcoded in the notebooks with the Linux character '/'.

The quick solution is to fix this in the notebooks, by replacing mld_features['id']= mld_features['filename'].apply(lambda x: x.split('/')[-1][:-4]) hinds_features['id']= hinds_features['filename'].apply(lambda x: x.split('/')[-1][:-4])

by mld_features['id']= mld_features['filename'].apply(lambda x: x.split('\')[-1][:-4]) hinds_features['id']= hinds_features['filename'].apply(lambda x: x.split('\')[-1][:-4])

or mld_features['id']= mld_features['filename'].apply(lambda x: x.split(os.sep)[-1][:-4]) hinds_features['id']= hinds_features['filename'].apply(lambda x: x.split(os.sep)[-1][:-4])

If you find similar filename splits in other notebooks, apply the same logic to fix it.

I will also commit a fix soon to make it permanent in the repository.

Let me know if it works or you have any further issue!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

gykovacs commented 2 years ago

The code wasnt really tested on windows, let me test it in the weekend and come back with a fix!