Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require user to input Deploy( ... metric ...) #283

Closed
mikkokotila opened this issue Apr 2, 2019 · 3 comments
Closed

require user to input Deploy( ... metric ...) #283

mikkokotila opened this issue Apr 2, 2019 · 3 comments
Assignees

Comments

@mikkokotila
Copy link
Contributor

mikkokotila commented Apr 2, 2019

Related with #282

@mikkokotila mikkokotila self-assigned this Apr 2, 2019
@PiaCuk
Copy link

PiaCuk commented Apr 3, 2019

Also I would like to report that you have to spell the metric's name out for Deploy() to work, otherwise you get a KeyError. Here is an example:

define model(x, y, x_val, y_val, params):
    [...]
    optimizer = optimizers.adam(lr_normalizer(params['lr'], optimizers.adam))
    model.compile(loss=params['losses'], optimizer=optimizer, metrics=['mae'])
    
    out = model.fit_generator(generator=train_generator, validation_data=val_generator,
                              epochs=params['epochs'], callbacks=[ta.live()])

    return out, model

dummy_x = np.empty((1, _channels))
dummy_y = np.empty((1, _channels))
scan = ta.Scan(x=dummy_x,
               y=dummy_y,
               model=model,
               params=params,
               grid_downsample=0.1,
               dataset_name='example',
               experiment_no='1')

ta.Deploy(scan, 'example', metric='mae', asc=True)

Traceback (most recent call last):
    [...]
KeyError: 'mae'

It works if you write

ta.Deploy(scan, 'example', metric='val_mean_absolute_error', asc=True)

@BraveDistribution
Copy link

BraveDistribution commented Jun 2, 2019

I can make a PR @mikkokotila for this issue, if needed.

mikkokotila added a commit that referenced this issue Jul 5, 2019
This commit initiates v0.6.1

- Removed the default 'val_acc' so instead have to explicitly state metric when deploying (fixes #283)
- Fixed a bug related with the case where x is not 2d
- Fixed test_script.py to correspond with the changes
@mikkokotila
Copy link
Contributor Author

This is now fixed in v.0.6.1 and currently available in pip install git+https://github.com/autonomio/talos@daily-dev.

Closing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants