-
Notifications
You must be signed in to change notification settings - Fork 229
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
Include contrib folder and pytorch stringifier #476
base: main
Are you sure you want to change the base?
Conversation
367918a
to
24012f7
Compare
This PR introduces a new contrib folder under pudb for community customization. A stringifier for pytorch is included. Detailed changelog: * A module was added under pudb/contrib/stringifiers as place to store custom stringifiers. * A stringifier for pytorch tensors and modules is included. * An option was added in the settings menu for the user to enable or disable the cotrib content for users that want to stick to the core pudb installation. * Changes were made in var_view.py and settings.py to allow for inclusion of the contrib/stringifiers in the configuration menu. Signed-off-by: Giorgos Paraskevopoulos <geopar@central.ntua.gr>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! There are some CI failures, and a few more concerns below.
@@ -0,0 +1,46 @@ | |||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you have the CI install pytorch to make sure this code is tested?
@@ -47,7 +47,7 @@ | |||
"Topic :: Terminals", | |||
"Topic :: Utilities", | |||
], | |||
packages=["pudb"], | |||
packages=["pudb", "pudb.contrib", "pudb.contrib.stringifiers"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages=["pudb", "pudb.contrib", "pudb.contrib.stringifiers"], | |
packages=find_packages(), |
Import from setuptools
.
from typing import Any | ||
|
||
try: | ||
import torch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is heavyweight, and it should only happen if the stringifier is actually used, not unconditionally on every import.
@@ -270,6 +277,14 @@ def _update_config(check_box, new_state, option_newvalue): | |||
bool(conf_dict["hide_cmdline_win"]), on_state_change=_update_config, | |||
user_data=("hide_cmdline_win", None)) | |||
|
|||
enable_community_contributed_content = urwid.CheckBox( | |||
"Enable community contributed content. This will give you access to more " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Enable community contributed content. This will give you access to more " | |
"Enable community contributed content. This will give you access to more " |
@@ -270,6 +277,14 @@ def _update_config(check_box, new_state, option_newvalue): | |||
bool(conf_dict["hide_cmdline_win"]), on_state_change=_update_config, | |||
user_data=("hide_cmdline_win", None)) | |||
|
|||
enable_community_contributed_content = urwid.CheckBox( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All other settings in pudb act instantaneously. This one should, too.
Unsubscribing... @-mention or request review once it's ready for a look or needs attention. |
This PR introduces a new contrib folder under pudb for community
customization. A stringifier for pytorch is included.
Related issue: #475
Detailed changelog:
custom stringifiers.
disable the cotrib content for users that want to stick to the core
pudb installation.
inclusion of the contrib/stringifiers in the configuration menu.
Signed-off-by: Giorgos Paraskevopoulos geopar@central.ntua.gr