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

Dev doc for the configuration file redesign #162

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alimaredia
Copy link
Contributor

No description provided.


This document represents the next step in the evolution of the configuration of the `ilab` CLI.
Ever since `ilab` was created, it relied upon the existence of configuration file written in YAML.
The current state of the config is documented [here](https://github.com/instructlab/dev-docs/pull/132).
Copy link
Member

Choose a reason for hiding this comment

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

I've just closed this PR as it's been abandoned - I would say remove this line


Throughout this document the terms "configuration", and "profile" will be used. The term "configuration" describes the entire internal data structure within `ilab` for configuration used when a command is run.

A "profile" is a subset of configuration needed to allow `ilab` to function optimally on a given piece of hardware. When applied a profile overrides the provided subset of configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
A "profile" is a subset of configuration needed to allow `ilab` to function optimally on a given piece of hardware. When applied a profile overrides the provided subset of configuration.
A "profile" is a subset of configuration needed to allow `ilab` to function optimally on a given piece of hardware. When applied, a profile overrides the provided subset of configuration.

Comment on lines +52 to +53
1. (System Internal) DefaultConfig data structure AKA the system defaults
2. (System Internal) Hardware & System Profile auto-detection
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
1. (System Internal) DefaultConfig data structure AKA the system defaults
2. (System Internal) Hardware & System Profile auto-detection
1. (System Internal) DefaultConfig data structure AKA the code defaults
2. (System Internal) System Profile configuration (if applicable)


1. (System Internal) DefaultConfig data structure AKA the system defaults
2. (System Internal) Hardware & System Profile auto-detection
3. (User provided) A configuration file
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
3. (User provided) A configuration file
3. (User provided) A configuration file (like the current `config.yaml`)

1. (System Internal) DefaultConfig data structure AKA the system defaults
2. (System Internal) Hardware & System Profile auto-detection
3. (User provided) A configuration file
4. (User provided) Flags for a specific command to override specific configuration variables
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
4. (User provided) Flags for a specific command to override specific configuration variables
4. (User provided) Flags for a specific command to override specific configuration variables (such as `--gpus` in `ilab model serve`)


The value(s) shown would reflect the configuration after profile auto-detection and user provided configuration files are applied.

`ilab config show` could also be a starting point for new configuration files.
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be a config generate feature


Currently `ilab` needs a configuration file to function. The goal of this phase of development is to decouple `ilab` from needing a configuration file, and to establish a clear hierarchy for users to understand how their configuration is set.

Configuration overrides happen both internally within `ilab`, and with user provided overrides.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Configuration overrides happen both internally within `ilab`, and with user provided overrides.
Configuration overrides happen both internally within `ilab`, and with user-provided overrides.


### Phase 1.2: System Profile Auto-detection

Maximizing the effectiveness of Instructlab involves changing the configuration to specify specific models, and configuration parameters. These changes depend on the hardware `ilab` is running on.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Maximizing the effectiveness of Instructlab involves changing the configuration to specify specific models, and configuration parameters. These changes depend on the hardware `ilab` is running on.
Maximizing the effectiveness of InstructLab involves changing the configuration to specify specific models, and configuration parameters. These changes depend on the hardware `ilab` is running on.

Set default configuration
```

### Phase 1.3: User provided configuration file
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
### Phase 1.3: User provided configuration file
### Phase 1.3: User-provided configuration file

...
```

### Phase 1.4: User provided flags
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
### Phase 1.4: User provided flags
### Phase 1.4: User-provided flags

$ ilab model serve
...
WARNING found configuration files at /home/ec2-user/.confg/instructlab/config.toml and /home/ec2-user/.config/instructlab/config.yaml. Configuration files not applied.
...
Copy link

@reidliu41 reidliu41 Dec 19, 2024

Choose a reason for hiding this comment

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

or can it read a default one, and show the WARNING too?

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.

3 participants