-
Notifications
You must be signed in to change notification settings - Fork 418
Introduce version field in CLI config yaml #1749
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
Conversation
Related to #1725 |
Dev doc related for this PR here: instructlab/dev-docs#117 |
4d1374d
to
94c891a
Compare
spoke with @alinaryan. I think this PR (for the sake of keeping development going). Should JUST focus on adding the cfg field. me, @alimaredia, and @alinaryan will follow up with a separate PR working on a backwards compat and version enforcing mechanism. IMO these are two different tasks and make sense to be split up |
94c891a
to
3fe24ce
Compare
@alimaredia @cdoern #1683 adds test and infrastructure to track config changes in git. This will help us to detect breaking changes or understand config changes in git history. |
resolves #1725 |
src/instructlab/configuration.py
Outdated
@@ -389,6 +390,7 @@ class Config(BaseModel): | |||
def get_default_config() -> Config: | |||
"""Generates default configuration for CLI""" | |||
return Config( | |||
version="1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're going to want to set this as a variable somewhere else in this file.
I would put it right above the variable for the config file name itself, https://github.com/instructlab/instructlab/blob/main/src/instructlab/configuration.py#L39.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a var
3fe24ce
to
e05bccc
Compare
Signed-off-by: Alina Ryan <[email protected]>
e05bccc
to
69d5bbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this, i like the simplicity. we will follow up with some backwards compat enforcing PRs
@@ -36,6 +36,7 @@ | |||
|
|||
ILAB_PACKAGE_NAME = "instructlab" | |||
CONFIG_FILENAME = "config.yaml" | |||
CONFIG_VERSION = "1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be doing the versioning here using semver, or should we instead do a discrete number like v1
, v2
, etc., so that we can handle migrations between configs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like to get an opinion on this from @tiran, @leseb, or @nathan-weinberg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a discrete number may make more sense here, we do something like that for the schema: https://github.com/instructlab/schema/tree/main/src/instructlab/schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as long as v1 can also be v1.1 or something like that I am fine with it.
We need to have different major/minor versions of the cfg in between minor releases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on some preliminary research, it seems like there are a few tradeoffs. We should create a dev-doc for the broader migration system as it seems to be a heavy lift.
I propose that we keep this as 1.0.0
instead of doing discrete numbers because of this exact point:
We need to have different major/minor versions of the cfg in between minor releases
If we decide that we want to use a scheme of discrete numbers instead, we can simply map 1.0.0
to v1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alimaredia has a dev doc started here instructlab/dev-docs#117
That point can be added in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Checklist:
conventional commits.