Skip to content

Conversation

@adrinjalali
Copy link
Member

This makes for a nice visual in our examples and for people who use notebooks to work with the Card object.

@adrinjalali
Copy link
Member Author

results can be seen here: https://skops--372.org.readthedocs.build/en/372/auto_examples/plot_model_card.html#sphx-glr-auto-examples-plot-model-card-py

two issues:

  • it doesn't look great, but we could maybe improve that
  • the metadata at the beginning of the file is annoying, we should have an easy way to remove that and get an actual model card

@adrinjalali
Copy link
Member Author

WDYT @merveenoyan @BenjaminBossan

@BenjaminBossan
Copy link
Collaborator

Hmm, I'm ambivalent about this change. I totally see how it can be useful in notebooks. The way it's rendered in the docs was very confusing to me though. Apart from the two issues that you mentioned, I found it hard to distinguish what is part of the actual docs and what is part of the model card.

I wonder if, for the docs, we should keep the default behavior. Maybe rendering the markdown could be done with a different method, not by __repr__? This way, it could still be done if explicitly desired.

@adrinjalali
Copy link
Member Author

well, sphinx-gallery only understands _repr_html_ and not _repr_markdown_, so removing _repr_html_ would make the documentation look like before.

I agree with not being able to distinguish the notebook from the rendered modelcard though. I wonder if we could do something there to fix that.

@BenjaminBossan
Copy link
Collaborator

well, sphinx-gallery only understands _repr_html_ and not _repr_markdown_, so removing _repr_html_ would make the documentation look like before.

So do we want to go with this first? I.e. only have the nice repr in jupyter notebooks and leave the docs as they were before? If we can come up with a way to fix the identified issues of how docs are rendered, we can add them later.

@adrinjalali
Copy link
Member Author

Since this came up in some recent discussions, WDYT @glemaitre

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.

2 participants