Re: [GRASS-dev] [GRASS-SVN] r70999 - grass-addons/grass7/raster/r.learn.ml

2017-05-02 Thread Steven Pawley
Thanks! Made a slip-up there.

I'm working on extending multiprocessing to the permutation feature importances 
so I'll make the fix tonight

Steve

Sent from my iPhone

> On May 2, 2017, at 5:07 PM, Vaclav Petras  wrote:
> 
> 
>> On Tue, May 2, 2017 at 12:45 PM,  wrote:
>> Author: spawley
>> Date: 2017-05-02 09:45:12 -0700 (Tue, 02 May 2017)
>> New Revision: 70999
>> 
>> Modified:
>>grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py
>>grass-addons/grass7/raster/r.learn.ml/r_learn_utils.py
>> Log:
>> r.learn.ml using multiprocessing for all cross-validations
>> 
>> Modified: grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py
>> ===
>> --- grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py 2017-05-02 13:41:15 
>> UTC (rev 70998)
>> +++ grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py 2017-05-02 16:45:12 
>> UTC (rev 70999)
>> @@ -249,13 +249,15 @@
>> ...
>> @@ -176,9 +215,9 @@
>>  try:
>>  list(scoring_methods.keys()).index(i)
>>  except:
>> -print('Scoring ' + i + ' is not a valid scoring method')
>> -print('Valid methods are:')
>> -print(scoring_methods.keys())
>> +gscript.fatal('Scoring ' + i + ' is not a valid scoring method')
>> +gscript.message('Valid methods are:')
>> +gscript.message(scoring_methods.keys())
> 
> Hi Steven,
> 
> the fatal call will end the execution. What you can do is to put there a 
> multiline string.
> 
> Vaclav
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] [GRASS-SVN] r70999 - grass-addons/grass7/raster/r.learn.ml

2017-05-02 Thread Vaclav Petras
On Tue, May 2, 2017 at 12:45 PM,  wrote:

> Author: spawley
> Date: 2017-05-02 09:45:12 -0700 (Tue, 02 May 2017)
> New Revision: 70999
>
> Modified:
>grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py
>grass-addons/grass7/raster/r.learn.ml/r_learn_utils.py
> Log:
> r.learn.ml using multiprocessing for all cross-validations
>
> Modified: grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py
> ===
> --- grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py 2017-05-02
> 13:41:15 UTC (rev 70998)
> +++ grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py 2017-05-02
> 16:45:12 UTC (rev 70999)
> @@ -249,13 +249,15 @@
> ...
> @@ -176,9 +215,9 @@
>  try:
>  list(scoring_methods.keys()).index(i)
>  except:
> -print('Scoring ' + i + ' is not a valid scoring method')
> -print('Valid methods are:')
> -print(scoring_methods.keys())
> +gscript.fatal('Scoring ' + i + ' is not a valid scoring
> method')
> +gscript.message('Valid methods are:')
> +gscript.message(scoring_methods.keys())
>

Hi Steven,

the fatal call will end the execution. What you can do is to put there a
multiline string.

Vaclav
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev