Skip to content

Auto-fill name/author when using kit import#722

Merged
amisevsk merged 2 commits intokitops-ml:mainfrom
amisevsk:import-flags
Jan 24, 2025
Merged

Auto-fill name/author when using kit import#722
amisevsk merged 2 commits intokitops-ml:mainfrom
amisevsk:import-flags

Conversation

@amisevsk
Copy link
Copy Markdown
Contributor

Description

  • Fill ModelKit name and author with placeholder values in kit import (name is repo name, author is organization)
  • Add 'author' flag / prompt

Linked issues

Closes #717

@amisevsk amisevsk requested a review from gorkem January 24, 2025 14:58
@gorkem
Copy link
Copy Markdown
Member

gorkem commented Jan 24, 2025

Test failure on this one

To avoid empty values appearing in 'kit list', set name and author from
the passed in repository -- name is the last segment of the URL, author
is the second last. This turns e.g. https://github.com/jozu-ai/kitops
into the following package

  package:
    name: kitops
    authors: [jozu-ai]

An alternative would be to prompt the user (and provide optional flags)
but this a) complicates the command, and b) duplicates the 'edit
Kitfile' functionality in the later step.
@amisevsk
Copy link
Copy Markdown
Contributor Author

The test failure was because I wasn't handling the author field correctly (it would add an empty author to the Kitfile rather than omitting the field entirely). Fixed now

@amisevsk amisevsk merged commit 019a4b5 into kitops-ml:main Jan 24, 2025
@amisevsk amisevsk deleted the import-flags branch January 24, 2025 19:36
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.

Missing NAME and MAINTAINER Fields for Hugging Face Models Pulled Using kit import

2 participants