Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

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

Open
Assignees
@gau-nernst

Description

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /