The editable installation in the new docker image didn't work. I added a fix for this.
Before:
root@eaa709a280b7:~# fast-llm train gpt --help
2024-11-13 08:05:35,320 Traceback (most recent call last):
File "/app/fast_llm/tools/cli.py", line 22, in fast_llm
from fast_llm.tools.train import CliTrainingConfig as Runnable
File "/app/fast_llm/tools/train.py", line 4, in <module>
from fast_llm.models.auto import trainer_registry
File "/app/fast_llm/models/auto.py", line 1, in <module>
from fast_llm.models.custom.config import CustomModelConfig, CustomTrainerConfig
File "/app/fast_llm/models/custom/config.py", line 5, in <module>
from fast_llm.models.gpt.config import (
File "/app/fast_llm/models/gpt/config.py", line 6, in <module>
from fast_llm.engine.multi_stage.config import FastLLMModelConfig, PretrainedFastLLMModelConfig
File "/app/fast_llm/engine/multi_stage/config.py", line 7, in <module>
from fast_llm import __version__
ImportError: cannot import name '__version__' from 'fast_llm' (unknown location)
After:
root@24efd592c0da:~# fast-llm train gpt --help
usage: fast-llm [-h] [-v] [-c CONFIG] [--verbose VERBOSE] [--config_auth_token_file CONFIG_AUTH_TOKEN_FILE] [--hydra] [--hydra-path HYDRA_PATH] [--hydra-config HYDRA_CONFIG] {gpt,gpt_custom}
positional arguments:
{gpt,gpt_custom} The Fast-LLM model type to use. Must be defined in the trainer registry in `fast_llm.models.auto`.
options:
-h, --help show this help message and exit
-v, --validate Validate the config without running the command.
-c CONFIG, --config CONFIG
The path or url to the base configuration yaml file.
--verbose VERBOSE Verbose level for logging the config.
--config_auth_token_file CONFIG_AUTH_TOKEN_FILE
Path to a file containing a (Github) authentication token.
--hydra Enable the hydra syntax for configuration updates. Note: this will only enable the update syntax for the command line arguments. See the other Hydra options for enabling more optional
features.
--hydra-path HYDRA_PATH
The hydra configuration path in which to loop for updates relative to the current working directory. Setting this will implicitly enable --hydra.
--hydra-config HYDRA_CONFIG
The name of the hydra base configuration as would be provided in a typical Hydra application. Mutually exclusive with `--config`, which it replaces. Requires --hydra-path to be set.
๐ Type of change
Select all that apply:
[x] ๐ Bug fix (non-breaking change that addresses a specific issue)
[ ] ๐ New feature (non-breaking change that adds functionality)
[ ] โ ๏ธ Breaking change (a change that could affect existing functionality)
โจ Description
The editable installation in the new docker image didn't work. I added a fix for this.
Before:
After:
๐ Type of change
Select all that apply:
๐ Changes
__init__.py
in/app/fast_llm
before running pip install.โ Checklist
Make sure the following tasks are completed before submitting the PR:
General:
Dependencies and Configuration:
Testing:
Performance Impact:
๐ Performance Impact Details
N/A
๐ Additional Notes
N/A