autonomio / talos

Hyperparameter Experiments with TensorFlow and Keras
https://autonom.io
MIT License
1.62k stars 270 forks source link

__init__() missing 1 required positional argument: 'task' #434

Closed rymoore closed 4 years ago

rymoore commented 4 years ago

I've successfully run a Scan on a model, but when I try predicting values from that scan using:

evaluate_object = talos.Predict(myScan)
evaluate_object.predict(score_X, 'val_acc', False)

I get the error __init__() missing 1 required positional argument: 'task'

I can't find reference to the "task" argument anywhere... what am I missing?

rymoore commented 4 years ago

and actually, I've found reference to task="binary" for my case, but now I'm getting the following error:

KeyError: '[ 6221 9922 962 ... 12710 10750 17106] not in index'

github-actions[bot] commented 4 years ago

Welcome to Talos community! Thanks so much for creating your first issue :)

mikkokotila commented 4 years ago

It's because you are passing the argument values in wrong order. See below for reference.

    def evaluate(self,
                 x,
                 y,
                 task,
                 metric,
                 model_id=None,
                 folds=5,
                 shuffle=True,
                 asc=False,
                 print_out=False):