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

ENH Added getting started snippet for .skops format #167

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

merveenoyan
Copy link
Collaborator

Resolves #165

The tests were a bit tricky given I couldn't directly create temporary file and save into it and already existing fixtures are serving to pickle format. I'll refactor them.

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.

Thanks @merveenoyan

)
if self.metadata.to_dict().get("model_file"):
model_file = self.metadata.to_dict().get("model_file")
if model_file.endswith(".skops"):
Copy link
Member

Choose a reason for hiding this comment

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

we shouldn't be relying on the extension of the file. We should add the format info to the metadata. Something like:

        "model": {
            "file": "model.pickle",
	    "format": "pickle" or "skops",
        },

Copy link
Collaborator Author

@merveenoyan merveenoyan Oct 4, 2022

Choose a reason for hiding this comment

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

I was thinking of this just yesterday when I was editing snippet on Hub 😅
I'm not relying on extensions much, as long as it's not .skops I assume it's pickle. People can't deserialize a pickle file with .load() anyway so it wouldn't work. But if you think people really can serialize a pickle with .skops extension, I will create the issue.

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.

I guess we can leave it as is then for now.

@adrinjalali adrinjalali changed the title Added getting started snippet for .skops format ENH Added getting started snippet for .skops format Oct 4, 2022
@adrinjalali adrinjalali merged commit 7206459 into skops-dev:main Oct 4, 2022
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.

Have snippets in model card for new .skops file format
2 participants