Skip to content
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

[BUGFIX] Serialization logic - additional fixes. #1420

Merged
merged 21 commits into from May 12, 2022

Conversation

yromanyshyn
Copy link
Contributor

resolves #1392 but contains much more modifications

List of changes:

== 1 ==

added a new type of serialization protocol, called IPythonSerializer.
Serializers that implement this kind of protocol must return a list of objects that implements IPython.core.formatters traits.
For more info please refer to the IPython documentation

We need this type of protocol in order to make sure that the check/suite result display works properly in different environments like JupyterLab/Classical Notebooks, especially when widgets are not enabled or not supported.

== 2 ==

added display_check, show, save_as_html methods to the CheckFailure type.

== 3 ==

now, 'Widgets UI' is also used in the colab env.

@yromanyshyn yromanyshyn requested review from a team as code owners May 11, 2022 09:17
@yromanyshyn yromanyshyn self-assigned this May 11, 2022
deepchecks/core/check_result.py Outdated Show resolved Hide resolved
deepchecks/core/serialization/suite_result/wandb.py Outdated Show resolved Hide resolved
@yromanyshyn yromanyshyn requested a review from JKL98ISR May 11, 2022 14:05
if file is None:
file = 'output.html'
if isinstance(file, str):
file = create_new_file_name(file)

if as_widget is True:
widget_to_html(
widget=self.to_widget(unique_id=output_id),
widget=self.to_widget(unique_id=unique_id or get_random_string(n=25)),
Copy link
Member

Choose a reason for hiding this comment

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

why the change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

previously output_id was declared above if file is None: now I just replaced it with one statement/

it means that if a user did not pass a unique_id we need to generate it by ourselves in order to make sure that navigation links will be rendered

@yromanyshyn yromanyshyn requested a review from JKL98ISR May 12, 2022 06:15
@JKL98ISR JKL98ISR self-requested a review May 12, 2022 09:11
Copy link
Member

@JKL98ISR JKL98ISR left a comment

Choose a reason for hiding this comment

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

check.show doesn't work in jupyter lab

Copy link
Member

@JKL98ISR JKL98ISR left a comment

Choose a reason for hiding this comment

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

check.show doesn't work in jupyter lab

Copy link
Member

@JKL98ISR JKL98ISR left a comment

Choose a reason for hiding this comment

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

did a mistake while checking :)

@JKL98ISR JKL98ISR merged commit 56c77c0 into main May 12, 2022
@delete-merged-branch delete-merged-branch bot deleted the serialization-additional branch May 12, 2022 09:17
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.

[BUG] Suite display not rendered correct in IFrame
2 participants