facebookresearch / hiplot

HiPlot makes understanding high dimensional data easy
https://facebookresearch.github.io/hiplot/
MIT License
2.74k stars 138 forks source link

[Bug] Getting a weird error by making the experiment a variable then calling display #271

Closed mike-leuer closed 1 year ago

mike-leuer commented 1 year ago

This works fine

data = [{'uid': 'a', 'dropout': 0.1, 'lr': 0.001, 'loss': 10.0, 'optimizer': 'SGD', 'x': x1},
        {'uid': 'b', 'dropout': 0.15, 'lr': 0.01, 'loss': 3.5, 'optimizer': 'Adam', 'x': x2},
        {'uid': 'c', 'dropout': 0.3, 'lr': 0.1, 'loss': 4.5, 'optimizer': 'Adam', 'x': x3}]
d = hip.Experiment.from_iterable(data).display()

image

However this does not work see screen shot

data = [{'uid': 'a', 'dropout': 0.1, 'lr': 0.001, 'loss': 10.0, 'optimizer': 'SGD', 'x': x1},
        {'uid': 'b', 'dropout': 0.15, 'lr': 0.01, 'loss': 3.5, 'optimizer': 'Adam', 'x': x2},
        {'uid': 'c', 'dropout': 0.3, 'lr': 0.1, 'loss': 4.5, 'optimizer': 'Adam', 'x': x3}]
d = hip.Experiment.from_iterable(data)
d.display()

image

mike-leuer commented 1 year ago

error-message.txt Probably useless but this is the text error message

mike-leuer commented 1 year ago

Using Mircosoft Machine Learning Studio https://learn.microsoft.com/en-us/azure/machine-learning/overview-what-is-azure-machine-learning

danthe3rd commented 1 year ago

Hi @mike-leuer-callaway-golf That's a very weird bug indeed. Both of your examples are working fine for me on a Google Collab, it seems more likely to be a bug within your notebook system at this point. As a workaround, you can try maybe the following:

d = hip.Experiment.from_iterable(data)
_ = d.display()
mike-leuer commented 1 year ago

Wow that fixes it. Do you have any idea why that is? (More of a programmers curiosity)

danthe3rd commented 1 year ago

I'm not exactly sure actually. One difference between your 2 cases was that in the first one, the notebook should output something like:

(hiplot widget)
<hiplot.ipython.IPythonExperimentDisplayed at 0x7ff61f198970>

But if you have an assignment, it does not display any variable (just the hiplot widget). I believe this was the main issue with your notebook system from Azure. So it's definitively a bug with the Azure notebook.

mike-leuer commented 1 year ago

Thank you for the help. Hopefully this helps the next person who uses azure notebooks.