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

return svg text in MolVisualizer #388

Merged
merged 2 commits into from
Sep 10, 2019

Conversation

corochann
Copy link
Member

No description provided.

@corochann
Copy link
Member Author

No-compat: The returned value will change to raw svg text format.

When using on jupyter notebook, user need to write below explicitly.

from IPython.core.display import SVG
SVG(svg.replace('svg:', ''))

Copy link

@dtaniwaki dtaniwaki left a comment

Choose a reason for hiding this comment

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

The change looks good other than the one on which I commented about the default value of the argument!

@@ -46,9 +46,24 @@ def __init__(self, logger=None):

def visualize(self, saliency, mol, save_filepath=None,
visualize_ratio=1.0, color_fn=red_blue_cmap,
scaler=abs_max_scaler, legend=''):
scaler=abs_max_scaler, legend='', raise_import_error=True

Choose a reason for hiding this comment

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

I think raise_import_error should be False by default if we follow the original behavior of saving png files.

Copy link
Member Author

Choose a reason for hiding this comment

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

okay i will fix it to set False as default.

@codecov-io
Copy link

Codecov Report

Merging #388 into master will decrease coverage by 4.77%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##           master     #388      +/-   ##
==========================================
- Coverage   91.42%   86.64%   -4.78%     
==========================================
  Files         222      222              
  Lines       10786    10786              
==========================================
- Hits         9861     9346     -515     
- Misses        925     1440     +515

@corochann corochann merged commit f707429 into chainer:master Sep 10, 2019
@mottodora mottodora added this to the 0.6.0 milestone Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants