Skip to content

Commit abc8ff0

Browse files
committed
update workflows and related tests
1 parent e052ec8 commit abc8ff0

File tree

5 files changed

+12
-29
lines changed

5 files changed

+12
-29
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dkn-compute"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
edition = "2021"
55
license = "Apache-2.0"
66
readme = "README.md"
@@ -45,7 +45,7 @@ sha3 = "0.10.8"
4545
fastbloom-rs = "0.5.9"
4646

4747
# workflows
48-
ollama-workflows = { git = "https://github.com/andthattoo/ollama-workflows", rev = "875f403" }
48+
ollama-workflows = { git = "https://github.com/andthattoo/ollama-workflows", rev = "31b6da6" }
4949

5050
# peer-to-peer
5151
libp2p = { git = "https://github.com/anilaltuner/rust-libp2p.git", rev = "7ce9f9e", features = [

docs/NODE_GUIDE.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -256,33 +256,15 @@ You will be asked to provide your choice of models within the CLI. You can also
256256

257257
```sh
258258
# macos or linux
259-
./dkn-compute-launcher -m=llama3.1:latest -m=gpt-3.5-turbo
259+
./dkn-compute-launcher -m=llama3.1:latest -m=gpt-4o-mini
260260
```
261261

262262
```sh
263263
# windows
264-
.\dkn-compute-launcher.exe -m=llama3.1:latest -m=gpt-3.5-turbo
264+
.\dkn-compute-launcher.exe -m=llama3.1:latest -m=gpt-4o-mini
265265
```
266266

267-
[Available models](https://github.com/andthattoo/ollama-workflows/blob/main/src/program/models.rs) are given below:
268-
269-
#### Ollama Models
270-
271-
- `finalend/hermes-3-llama-3.1:8b-q8_0`
272-
- `phi3:14b-medium-4k-instruct-q4_1`
273-
- `phi3:14b-medium-128k-instruct-q4_1`
274-
- `phi3.5:3.8b`
275-
- `phi3.5:3.8b-mini-instruct-fp16`
276-
- `llama3.1:latest`
277-
- `llama3.1:8b-instruct-q8_0`
278-
- `gemma2:9b-instruct-q8_0`
279-
280-
#### OpenAI Models
281-
282-
- `gpt-3.5-turbo`
283-
- `gpt-4-turbo`
284-
- `gpt-4o`
285-
- `gpt-4o-mini`
267+
Available models can be seen within the launcher, or under [`ollama-workflows/models`](https://github.com/andthattoo/ollama-workflows/blob/main/src/program/models.rs).
286268

287269
### Additional Static Nodes
288270

src/config/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,12 @@ impl DriaComputeNodeConfig {
9696
log::info!("Node Address: 0x{}", hex::encode(address));
9797

9898
let model_config = ModelConfig::new_from_csv(env::var("DKN_MODELS").ok());
99+
#[cfg(not(test))]
99100
if model_config.models.is_empty() {
100101
log::error!("No models were provided, make sure to restart with at least one model provided within DKN_MODELS.");
101102
panic!("No models provided.");
102103
}
103-
log::info!("Models: {}", model_config);
104+
log::info!("Models: {:?}", model_config.models);
104105

105106
let p2p_listen_addr = env::var("DKN_P2P_LISTEN_ADDR")
106107
.map(|addr| addr.trim_matches('"').to_string())

src/config/models.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ mod tests {
143143

144144
#[test]
145145
fn test_model_matching() {
146-
let cfg = ModelConfig::new_from_csv(Some("gpt-3.5-turbo,llama3.1:latest".to_string()));
146+
let cfg = ModelConfig::new_from_csv(Some("gpt-4o,llama3.1:latest".to_string()));
147147
assert_eq!(
148148
cfg.get_matching_model("openai".to_string()).unwrap().1,
149-
Model::GPT3_5Turbo,
149+
Model::GPT4o,
150150
"Should find existing model"
151151
);
152152

@@ -159,7 +159,7 @@ mod tests {
159159
);
160160

161161
assert!(
162-
cfg.get_matching_model("gpt-4o".to_string()).is_err(),
162+
cfg.get_matching_model("gpt-4o-mini".to_string()).is_err(),
163163
"Should not find anything for unsupported model"
164164
);
165165

0 commit comments

Comments
 (0)