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

MNT: Change placeholder character to control character #258

Merged

Conversation

E-Aho
Copy link
Collaborator

@E-Aho E-Aho commented Dec 17, 2022

Small change that swaps from using an arbitrary string of real world characters to a unicode control character.

This should reduce the risk of bugs (e.g, the original code would cause bugs if a user decided to use '$%!?' in their model card subsection or table), and the unit seperator feels a good fit for this use case.

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

skops/card/_model_card.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Correct me if I'm wrong, this change wouldn't make a bug completely impossible, just (even more) unlikely. If so, I'm happy with the change.

@E-Aho
Copy link
Collaborator Author

E-Aho commented Dec 19, 2022

Correct me if I'm wrong, this change wouldn't make a bug completely impossible, just (even more) unlikely. If so, I'm happy with the change.

You're correct. If a user tried to pass in ASCII control characters into their table names, it would perform differently from how they expect.
But a user trying to add control characters is much less likely than using the previous punctuation imo

@adrinjalali adrinjalali merged commit 45b5972 into skops-dev:main Dec 19, 2022
@E-Aho E-Aho deleted the MNT-change-placeholder-string-for-cards branch December 19, 2022 13:24
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.

3 participants