Skip to content

Conversation

@orionr
Copy link
Contributor

@orionr orionr commented Mar 21, 2019

Adding a popup dialog for when plugins are not created. Note that this is different from being "inactive", which can be due to data, etc.

Fixes #2027

Everything should be good to go and I've tested on my Mac with the following:

conda create --name tfpy36 python=3.6
conda activate tfpy36
pip install --upgrade pip
pip install tf-nightly-2.0-preview
conda install protobuf
conda install absl-py
conda install numpy
bazel build tensorboard
./bazel-bin/tensorboard/tensorboard --logdir ~/local/sample_runs/runs
# Navigate to the hparams tab and verify a popup is NOT shown

conda create --name notf python=2.7
conda activate notf
pip install --upgrade pip
pip install scipy
conda install protobuf
conda install absl-py
conda install numpy
bazel build tensorboard
./bazel-bin/tensorboard/tensorboard --logdir ~/local/sample_runs/runs
# Navigate to the hparams tab and verify a popup is shown

cc @lanpa, @nfelt

@orionr orionr force-pushed the add-dialogs-for-non-init-plugins branch from 72cc11b to 678e6b9 Compare March 27, 2019 16:41
@orionr orionr changed the title [WIP] Initial work on adding dialogs Add popup dialog for plugins that require TensorFlow Mar 27, 2019
@orionr
Copy link
Contributor Author

orionr commented Mar 27, 2019

@nfelt if tests pass this should be good for review. Thanks!

@orionr
Copy link
Contributor Author

orionr commented Mar 27, 2019

And tests pass! We're good.

@orionr
Copy link
Contributor Author

orionr commented Apr 17, 2019

@nfelt and @wchargin, a gentle ping for review on this. Thanks.

Copy link
Contributor

@nfelt nfelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, just a few pretty minor code cleanup requests.

The debugger plugin currently doesn't have any indication about it not working with TF - can we change the recently introduced try-catch in the loader to raise an exception indicating that TF is required to use the debugger? This only happens when the --debugger_port has been passed so it doesn't impact the default no-TF use case.

try:
# pylint: disable=g-import-not-at-top,unused-import
import tensorflow
except ImportError:
return None

Ideally we would message that through the dialog, but the way the debugger is structured with its own separate initial dialog makes that difficult, so for now this would at least prevent if from silently not working.

@orionr
Copy link
Contributor Author

orionr commented Apr 20, 2019

@nfelt (and @wchargin) all comments should be addressed. I needed to use a function scope to add PLUGIN_NAME but that seemed worth it. Also kept the _requestManager change, since it is consistent with the other plugins. Let me know if I should revert that particular change. Tested in a non-TensorFlow and TensorFlow environment locally on my Mac.

@orionr
Copy link
Contributor Author

orionr commented Apr 22, 2019

@nfelt any thoughts on the CI failures? Seems unrelated to my changes, but not 100% sure.

Copy link
Contributor

@nfelt nfelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PLUGIN_NAME cleanup!

@orionr
Copy link
Contributor Author

orionr commented Apr 23, 2019

@nfelt ready for final review. Thanks.

@orionr
Copy link
Contributor Author

orionr commented Apr 23, 2019

One last else clause coming - stay tuned.

@orionr
Copy link
Contributor Author

orionr commented Apr 23, 2019

@nfelt made that one last fix - thanks.

@orionr
Copy link
Contributor Author

orionr commented Apr 24, 2019

@nfelt, please merge when ready. Thank you. :)

@nfelt nfelt merged commit 1a8edce into tensorflow:master Apr 24, 2019
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

Successfully merging this pull request may close these issues.

Add clean UI for plugins requiring TensorFlow when not installed

3 participants