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 support for arbitrary parameters in models #385

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

amisevsk
Copy link
Contributor

@amisevsk amisevsk commented Jun 26, 2024

Description

Add ability to store arbitrary additional data in a Kitfile's model, e.g.

model:
  name: my-model
  path: ./model.bin
  parameters:
    <any valid yaml>

This comes with some caveats in serialization:

  • Numerical fields will be converted to decimal representation, so 0xFF will be come 255, 1.2e+3 will become 1200
  • Strings will be serialized ignoring flow/etc.
  • Anything yaml-specific (i.e. not included in JSON) is unsupported
  • Maps will have their keys sorted alphabetically ({b: b, a: a} -> {a: a, b: b})

The net effect of this is that the unpacked model may have a (superficially) different Kitfile than the original, but both Kitfiles will pack to the same digest.

Linked issues

Closes #366

Add field 'parameters' to Kitfile models; this is an unstructured yaml
field that can hold arbitrary data as might be useful in individual
cases.
@amisevsk amisevsk requested a review from gorkem June 26, 2024 19:01
Copy link
Contributor

@gorkem gorkem left a comment

Choose a reason for hiding this comment

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

Can you fix the build failure

@amisevsk
Copy link
Contributor Author

amisevsk commented Jul 4, 2024

Ah, forgot a license header

@amisevsk amisevsk merged commit 399b9dd into jozu-ai:main Jul 4, 2024
3 checks passed
@amisevsk amisevsk deleted the model-parameters branch July 4, 2024 21:18
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.

Add Ability to attach metadata to artifacts
2 participants