facebook / Ax

Adaptive Experimentation Platform
https://ax.dev
MIT License
2.36k stars 306 forks source link

TypeError: __init__() got an unexpected keyword argument 'encoding' #83

Closed glenn-jocher closed 5 years ago

glenn-jocher commented 5 years ago

When running the https://ax.dev/tutorials/tune_cnn.html notebook file in Google Colab: https://colab.research.google.com/drive/1P6TvA9UZDtLf9dMFTcYWm_RUBW0wpsiV#scrollTo=DMsfBROgGSBK

render(plot_contour(model=model, param_x='lr', param_y='momentum', metric_name='accuracy'))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-9-849423054076> in <module>()
----> 1 render(plot_contour(model=model, param_x='lr', param_y='momentum', metric_name='accuracy'))

2 frames
/usr/local/lib/python3.6/dist-packages/simplejson/__init__.py in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, encoding, default, use_decimal, namedtuple_as_object, tuple_as_array, bigint_as_string, sort_keys, item_sort_key, for_json, ignore_nan, int_as_string_bitcount, iterable_as_array, **kw)
    397         ignore_nan=ignore_nan,
    398         int_as_string_bitcount=int_as_string_bitcount,
--> 399         **kw).encode(obj)
    400 
    401 

TypeError: __init__() got an unexpected keyword argument 'encoding'
ldworkin commented 5 years ago

Hi @glenn-jocher -- currently working on this! Fix should be in shortly.

glenn-jocher commented 5 years ago

Great!

ldworkin commented 5 years ago

Hi @glenn-jocher -- so I think this should be fixed by https://github.com/facebook/Ax/commit/10b3a9f4cc3458615eab0e9cbc5b2eb1e5882839, which removes our dependency on simplejson. We'll be pushing a new release at the end of the week with this fix, or else in the meantime you can try building off master. Hope this takes care of it for you!

glenn-jocher commented 5 years ago

@ldworkin thanks for the update! I recently tried this again. This time there is no error upon plotting, but now no plots show up in the jupyter notebook. I saved the outputs here so you could reproduce: https://colab.research.google.com/drive/1P6TvA9UZDtLf9dMFTcYWm_RUBW0wpsiV#scrollTo=DMsfBROgGSBK

ldworkin commented 5 years ago

Hi @glenn-jocher! Ah yes, we just discovered this is a problem -- see issue https://github.com/facebook/Ax/issues/94. We will have a fix for this next week, but in the meantime, you can workaround it by using vanilla Jupyter (not Jupyter Labs). The plots should all work without any issues there.

Will close the task now since the original issue is fixed in our current release, and you can follow https://github.com/facebook/Ax/issues/94 for updates on this other issue.