-
Notifications
You must be signed in to change notification settings - Fork 469
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
add component.Info() support lists #2338
add component.Info() support lists #2338
Conversation
superduper/misc/special_dicts.py
Outdated
handled_list = [] | ||
for item in lst: | ||
if isinstance(item, Leaf): | ||
if len(str(item)) > 50: |
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.
since you are already making changes to the file, lets make 50 value a const var.
superduper/misc/special_dicts.py
Outdated
@@ -418,6 +432,8 @@ def _component_info(obj): | |||
value = str(value)[:50] + "..." | |||
else: | |||
value = str(value) | |||
elif isinstance(value, list): |
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.
lets add test for tuple as well
elif isinstance(value, (tuple, list))
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.
Agreed.
superduper/misc/special_dicts.py
Outdated
handled_list.append(str(item)[:50] + "...") | ||
else: | ||
handled_list.append(str(item)) | ||
elif isinstance(item, list): |
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.
you can test for tuple as well
Hi @kartik4949 ,I have changed it.please review it.Thank you. |
Description
add component.Info() support lists
Related Issues
[BUG] Component.info() doesn't go inside lists #2234
Checklist
make unit_testing
andmake integration-testing
successfully?Additional Notes or Comments