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

chore: Retrieve engine from DB instead of model.yml #2167

Open
gau-nernst opened this issue Mar 21, 2025 · 1 comment
Open

chore: Retrieve engine from DB instead of model.yml #2167

gau-nernst opened this issue Mar 21, 2025 · 1 comment
Assignees

Comments

@gau-nernst
Copy link
Contributor

Problem Statement

A lot of code does the following

  • Get model entry from DB
  • Get path to model.yml. Read model.yml to obtain engine value

e.g.

yaml_handler.ModelConfigFromFile(
fmu::ToAbsoluteCortexDataPath(
fs::path(model_entry.value().path_to_model_yaml))
.string());
auto model_config = yaml_handler.GetModelConfig();
if (model_config.engine == kLlamaEngine) {

auto yaml_fp = fmu::ToAbsoluteCortexDataPath(
fs::path(model_entry.value().path_to_model_yaml));
yaml_handler.ModelConfigFromFile(yaml_fp.string());
auto mc = yaml_handler.GetModelConfig();
if (engine_svc_->IsRemoteEngine(mc.engine)) {

This is unnecessary because the DB already has column engine

We must make sure the column engine is registered correctly e.g. Currently downloading single GGUF file does not fill in column engine

cortex::db::ModelEntry model_entry{
/* .model = */ ggufDownloadItem.id,
/* .author_repo_id = */ author_id,
/* .branch_name = */ branch,
/* .path_to_model_yaml = */ rel.string(),
/* .model_alias = */ ggufDownloadItem.id,
"",
"",
/* .status = */ cortex::db::ModelStatus::Downloaded,
"",
""};

This is also a prerequisite for #2151

Feature Idea

See above

@gau-nernst gau-nernst self-assigned this Mar 21, 2025
@gau-nernst gau-nernst added this to Menlo Mar 21, 2025
@github-project-automation github-project-automation bot moved this to Investigating in Menlo Mar 21, 2025
@github-roushan
Copy link
Contributor

@gau-nernst.
can i take this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Investigating
Development

No branches or pull requests

2 participants