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

move llmware base directory #644

Open
c-w-m opened this issue Apr 28, 2024 · 2 comments
Open

move llmware base directory #644

c-w-m opened this issue Apr 28, 2024 · 2 comments

Comments

@c-w-m
Copy link

c-w-m commented Apr 28, 2024

Problem: I'm running out of storage on my primary drive

Suggested fix: allow an environment variable to set the base path

Example Refactor: llmware\llmware\configs.py

  • use LLMWARE_BASE_PATH environment variable to set _base_fp
  • revert to using the existing USERPROFILE path if directory does not exist
LLMWARE_BASE_PATH_env_var
@MacOS
Copy link
Contributor

MacOS commented May 8, 2024

Hi @c-w-m,

thank you for that feature request! I think it is definitely something that should be at least considered to be implemented.

@doberst
Copy link
Contributor

doberst commented May 23, 2024

@c-w-m - could you please take a look at the LLMWareConfig class in configs.py - it provides a variety of options for setting the home path and where artifacts are stored locally - I am copying and pasting the relevant config parameters below found in this file:

class LLMWareConfig:

    """LLMWare global configuration object - use set/get to update """

    if platform.system() == "Windows":

        _base_fp = {"home_path": os.environ.get("USERPROFILE"),
                    "llmware_path_name": "llmware_data" + os.sep}
    else:
        _base_fp = {"home_path": os.environ.get("HOME"),
                    "llmware_path_name": "llmware_data" + os.sep}

    _fp = {"model_repo_path_name": "model_repo" + os.sep,
           "library_path_name": "accounts" + os.sep,
           "input_path_name": "input_channel" + os.sep,
           "parser_path_name": "parser_history" + os.sep,
           "query_path_name": "query_history" + os.sep,
           "prompt_path_name": "prompt_history" + os.sep,
           "tmp_path_name": "tmp" + os.sep}

To set the parameter: LLMWareConfig().set_home("/new/path/") or by setting the os.environ variable.

Please confirm back if this resolves/advances the issue ...

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

No branches or pull requests

3 participants