Skip to content

Commit 2341489

Browse files
committed
fix loglevels, add exec platform name
1 parent 6737a04 commit 2341489

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dkn-compute-launcher"
33
edition = "2021"
4-
version = "0.1.15"
4+
version = "0.1.16"
55
license = "Apache-2.0"
66
readme = "README.md"
77
description = "Dria Compute Node Launcher"

src/commands/start.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,14 @@ pub async fn run_compute_node(
150150

151151
// spawn compute node
152152
let compute_process = Command::new(exe_path)
153+
// add env variable for the path, respecting the `--profile` option
153154
.env(DKN_COMPUTE_ENV_KEY, env_path)
155+
// let compute node know that it is started by the launcher
156+
// see: https://github.com/firstbatchxyz/dkn-compute-node/blob/master/compute/src/config.rs#L126
157+
.env(
158+
"DKN_EXEC_PLATFORM",
159+
format!("launcher/v{DKN_LAUNCHER_VERSION}"),
160+
)
154161
.spawn()
155162
.wrap_err("failed to spawn compute node")?;
156163

src/settings/loglevel.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ pub fn edit_log_level(dria_env: &mut DriaEnv) -> eyre::Result<()> {
8585
enum LogModules {
8686
DknComputeNode,
8787
DknP2P,
88-
DknWorkflows,
88+
DknExecutor,
8989
Libp2p,
90-
OllamaWorkflows,
9190
}
9291

9392
impl LogModules {
@@ -100,9 +99,8 @@ impl LogModules {
10099
match self {
101100
Self::DknComputeNode => "dkn_compute",
102101
Self::DknP2P => "dkn_p2p",
103-
Self::DknWorkflows => "dkn_workflows",
102+
Self::DknExecutor => "dkn_executor",
104103
Self::Libp2p => "libp2p",
105-
Self::OllamaWorkflows => "ollama_workflows",
106104
}
107105
}
108106
}
@@ -113,9 +111,8 @@ impl std::fmt::Display for LogModules {
113111
match self {
114112
Self::DknComputeNode => write!(f, "Dria Compute Node: Core"),
115113
Self::DknP2P => write!(f, "Dria Compute Node: P2P"),
116-
Self::DknWorkflows => write!(f, "Dria Compute Node: Workflows"),
114+
Self::DknExecutor => write!(f, "Dria Compute Node: Executors"),
117115
Self::Libp2p => write!(f, "Low-level Lib2p Modules"),
118-
Self::OllamaWorkflows => write!(f, "Ollama Workflows"),
119116
}
120117
}
121118
}

0 commit comments

Comments
 (0)