Closed lmsanch closed 5 years ago
Updated TPOT to 0.11 via:
pip install --upgrade --no-deps --force-reinstall git+https://github.com/EpistasisLab/tpot.git@development
Same issue with:
SCORERS['rmsle_loss'] = make_scorer(RMSLE, greater_is_better=False)
params ={'cv':5,
'scoring': 'rmsle_loss',
'generations':10,
'random_state':0,
'max_eval_time_mins':10}
I get:
ValueError: 'rmsle_loss' is not a valid scoring value. Use sorted(sklearn.metrics.SCORERS.keys()) to get valid options.
I found a solution, but TPOT has a bug in scorer (Although the functions shows up in the SCORER dictionary, it is not taken by TPOT)
#SCORERS['rmsle_loss'] = make_scorer(RMSLE, greater_is_better=False)
rmsle_loss= make_scorer(RMSLE, greater_is_better=False)
params ={'cv':5,
'scoring': rmsle_loss,
'generations':10,
'random_state':0,
'max_eval_time_mins':10}
Hi, I'm running into the same issue. What was your solution?
I found Issue #664 which advises to use n_jobs=1. That works for me for now.
Updated TPOT to 0.11 via:
pip install --upgrade --no-deps --force-reinstall git+https://github.com/EpistasisLab/tpot.git@development
Same issue with:SCORERS['rmsle_loss'] = make_scorer(RMSLE, greater_is_better=False) params ={'cv':5, 'scoring': 'rmsle_loss', 'generations':10, 'random_state':0, 'max_eval_time_mins':10}
I get:
ValueError: 'rmsle_loss' is not a valid scoring value. Use sorted(sklearn.metrics.SCORERS.keys()) to get valid options.
Thank you @lmsanch Your suggestion saved my day!
I created a custom function with sklearn metrics, which worked fine until I had to do a new reinstall of Anaconda and TPOT in my mac. Now, I am using tpot.version '0.9.1', python 3.7.5
The function runs well on my Ubuntu machine, so I am not sure what the problem is.
Context of the issue
Then:
rmsle_loss = make_scorer(RMSLE, greater_is_better=False)
Then I pass this parameters to TPOT:
I get these warnings:
Then in get this error:
For the first value error, ValueError: 'RMSLE' is not a valid scoring value. TPOT warns: Use sorted(sklearn.metrics.SCORERS.keys()) to get valid options.
If I do that, I see that my function IS among the valid functions, so I dont know what the issue is:
I had a similar issue and Weixuan Fu suggested to install a different version of TPOT to solve the related problem.
pip install --upgrade --no-deps --force-reinstall git+https://github.com/weixuanfu/tpot.git@scoring_api
I did this in my mac (don't remember doing it in Ubuntu), and I still have the problem.
I also tried:
And then passing this to my dictionary of parameters to TPOT:
Obtaining the same error:
ValueError: 'rmsle_loss' is not a valid scoring value. Use sorted(sklearn.metrics.SCORERS.keys()) to get valid options.
[the remaining entries are only necessary if you are reporting a bug]Process to reproduce the issue
[ordered list the process to finding and recreating the issue, example below]
fit()
function with training data and custom function'RMSLE'
at the beginning of the processExpected result
to run w/o problems, like in my Ubuntu machine
Current result
[describe what you currently experience from this process, and thereby explain the bug]
Possible fix
[not necessary, but suggest fixes or reasons for the bug]
name of issue
screenshot[if relevant, include a screenshot]