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

Add model metadata #8

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Add model metadata #8

merged 1 commit into from
Jun 10, 2024

Conversation

isaranto
Copy link
Collaborator

@isaranto isaranto commented Jun 7, 2024

Add the option of listing available models in the package.
After installing the package the user can run python -m liftwing and get a list of available models along with the API Documentation link and the model card.
When adding a new model the developer needs to add the relevant metadata for the model (create an instance of a pydantic ModelMetadata class) and add that to the init.py of liftwing. Then main.py picks all metadata and prints them.

Alternatively this could be done using a --list argument but I thought that it wasn't needed for now to make things simpler.
If however we plan to add more functionality to this in the future it would be better to do it from now. Let me know what you think.

 python -m liftwing
(
    name=Language-agnostic revert risk,
    classname=RevertRiskAPIModel,
    api_documentation_url=https://api.wikimedia.org/wiki/Lift_Wing_API/Reference/Get_reverted_risk_language_agnostic_prediction,
    wmf_model_card_url=https://meta.wikimedia.org/wiki/Machine_learning_models/Proposed/Language-agnostic_revert_risk
)

@mercelisvaughan
Copy link
Collaborator

after reading the instructions this looks good to me

@isaranto isaranto merged commit 39c6491 into main Jun 10, 2024
@isaranto isaranto deleted the add-metadata-list branch June 10, 2024 15:52
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.

None yet

2 participants