R Under development (unstable) (2025-08-24 r88696 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(edgemodelr) edgemodelr: Local language model inference via llama.cpp Ensure you have GGUF model files for inference. > > test_check("edgemodelr") 📁 Model file not found: does_not_exist.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: dummy.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: dummy.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: dummy.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: dummy.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() gguf_init_from_file_impl: invalid magic characters: 'This', expected 'GGUF' llama_model_load: error loading model: llama_model_loader: failed to load model from D:\RCompile\CRANincoming\R-devel\edgemodelr.Rcheck\tests\testthat\fake_model.gguf llama_model_load_from_file_impl: failed to load model 📁 Model file not found: nonexistent.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: nonexistent.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: nonexistent.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: nonexistent.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: nonexistent.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: nonexistent.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: nonexistent_model.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: test.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() 📁 Model file not found: test.gguf 💡 Try these options: 1. Download a model: edge_download_model('TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF', 'tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf') 2. Quick setup: edge_quick_setup('TinyLlama-1.1B') 3. List models: edge_list_models() [ FAIL 25 | WARN 0 | SKIP 18 | PASS 81 ] ══ Skipped tests (18) ══════════════════════════════════════════════════════════ • No test model available for concurrency tests (1): 'test-error-handling.R:202:7' • No test model available for edge case tests (1): 'test-error-handling.R:172:7' • No test model available for integration tests (1): 'test-integration.R:43:7' • No test model available for memory constraint tests (1): 'test-error-handling.R:110:7' • No test model available for memory management tests (1): 'test-model-management.R:115:7' • No test model available for performance tests (1): 'test-integration.R:175:7' • No test model available for real model loading tests (1): 'test-model-loading.R:86:5' • No test model available for streaming tests (1): 'test-streaming.R:148:5' • No test model available for stress tests (1): 'test-integration.R:138:7' • No test model available for text completion tests (1): 'test-text-completion.R:114:5' • empty test (8): 'test-error-handling.R:1:1', 'test-integration.R:1:1', 'test-model-loading.R:1:1', 'test-model-management.R:127:3', 'test-model-management.R:1:1', 'test-model-management.R:148:1', 'test-streaming.R:1:1', 'test-text-completion.R:118:1' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-error-handling.R:5:5'): Invalid file paths are handled properly ── `edge_load_model("does_not_exist.gguf")` threw an error with unexpected message. Expected match: "Failed to load GGUF model" Actual message: "Model file does not exist: does_not_exist.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-error-handling.R:5:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─edgemodelr::edge_load_model("does_not_exist.gguf") ── Failure ('test-error-handling.R:11:5'): Invalid file paths are handled properly ── `edge_load_model("")` threw an error with unexpected message. Expected match: "model_path cannot be empty|Failed to load GGUF model" Actual message: "Model file does not exist: " Backtrace: ▆ 1. ├─testthat::expect_error(edge_load_model(""), "model_path cannot be empty|Failed to load GGUF model") at test-error-handling.R:11:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─edgemodelr::edge_load_model("") ── Failure ('test-error-handling.R:17:5'): Invalid file paths are handled properly ── `edge_load_model(NULL)` threw an error with unexpected message. Expected match: "model_path must be a string|Failed to load GGUF model" Actual message: "invalid 'file' argument" Backtrace: ▆ 1. ├─testthat::expect_error(edge_load_model(NULL), "model_path must be a string|Failed to load GGUF model") at test-error-handling.R:17:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─edgemodelr::edge_load_model(NULL) 7. └─base::file.exists(model_path) ── Failure ('test-error-handling.R:36:5'): Invalid parameters are rejected ───── `suppressWarnings(edge_load_model(dummy_path, n_ctx = -1))` threw an error with unexpected message. Expected match: "n_ctx must be positive|Failed to load GGUF model" Actual message: "Model file does not exist: dummy.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-error-handling.R:36:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. ├─base::suppressWarnings(edge_load_model(dummy_path, n_ctx = -1)) 7. │ └─base::withCallingHandlers(...) 8. └─edgemodelr::edge_load_model(dummy_path, n_ctx = -1) ── Failure ('test-error-handling.R:42:5'): Invalid parameters are rejected ───── `suppressWarnings(edge_load_model(dummy_path, n_ctx = 0))` threw an error with unexpected message. Expected match: "n_ctx must be positive|Failed to load GGUF model" Actual message: "Model file does not exist: dummy.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-error-handling.R:42:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. ├─base::suppressWarnings(edge_load_model(dummy_path, n_ctx = 0)) 7. │ └─base::withCallingHandlers(...) 8. └─edgemodelr::edge_load_model(dummy_path, n_ctx = 0) ── Failure ('test-error-handling.R:48:5'): Invalid parameters are rejected ───── `suppressWarnings(edge_load_model(dummy_path, n_ctx = 999999999))` threw an error with unexpected message. Expected match: "Failed to load GGUF model" Actual message: "Model file does not exist: dummy.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-error-handling.R:48:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. ├─base::suppressWarnings(edge_load_model(dummy_path, n_ctx = 999999999)) 7. │ └─base::withCallingHandlers(...) 8. └─edgemodelr::edge_load_model(dummy_path, n_ctx = 999999999) ── Failure ('test-error-handling.R:54:5'): Invalid parameters are rejected ───── `suppressWarnings(edge_load_model(dummy_path, n_gpu_layers = -1))` threw an error with unexpected message. Expected match: "n_gpu_layers cannot be negative|Failed to load GGUF model" Actual message: "Model file does not exist: dummy.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-error-handling.R:54:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. ├─base::suppressWarnings(edge_load_model(dummy_path, n_gpu_layers = -1)) 7. │ └─base::withCallingHandlers(...) 8. └─edgemodelr::edge_load_model(dummy_path, n_gpu_layers = -1) ── Failure ('test-error-handling.R:210:5'): Resource cleanup after errors ────── `edge_load_model("nonexistent.gguf")` threw an error with unexpected message. Expected match: "Failed to load GGUF model" Actual message: "Model file does not exist: nonexistent.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(edge_load_model("nonexistent.gguf"), "Failed to load GGUF model") at test-error-handling.R:210:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─edgemodelr::edge_load_model("nonexistent.gguf") ── Failure ('test-error-handling.R:217:7'): Resource cleanup after errors ────── `suppressWarnings(edge_load_model("nonexistent.gguf"))` threw an error with unexpected message. Expected match: "Failed to load GGUF model" Actual message: "Model file does not exist: nonexistent.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-error-handling.R:217:7 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. ├─base::suppressWarnings(edge_load_model("nonexistent.gguf")) 7. │ └─base::withCallingHandlers(...) 8. └─edgemodelr::edge_load_model("nonexistent.gguf") ── Failure ('test-error-handling.R:217:7'): Resource cleanup after errors ────── `suppressWarnings(edge_load_model("nonexistent.gguf"))` threw an error with unexpected message. Expected match: "Failed to load GGUF model" Actual message: "Model file does not exist: nonexistent.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-error-handling.R:217:7 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. ├─base::suppressWarnings(edge_load_model("nonexistent.gguf")) 7. │ └─base::withCallingHandlers(...) 8. └─edgemodelr::edge_load_model("nonexistent.gguf") ── Failure ('test-error-handling.R:217:7'): Resource cleanup after errors ────── `suppressWarnings(edge_load_model("nonexistent.gguf"))` threw an error with unexpected message. Expected match: "Failed to load GGUF model" Actual message: "Model file does not exist: nonexistent.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-error-handling.R:217:7 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. ├─base::suppressWarnings(edge_load_model("nonexistent.gguf")) 7. │ └─base::withCallingHandlers(...) 8. └─edgemodelr::edge_load_model("nonexistent.gguf") ── Failure ('test-error-handling.R:217:7'): Resource cleanup after errors ────── `suppressWarnings(edge_load_model("nonexistent.gguf"))` threw an error with unexpected message. Expected match: "Failed to load GGUF model" Actual message: "Model file does not exist: nonexistent.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-error-handling.R:217:7 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. ├─base::suppressWarnings(edge_load_model("nonexistent.gguf")) 7. │ └─base::withCallingHandlers(...) 8. └─edgemodelr::edge_load_model("nonexistent.gguf") ── Failure ('test-error-handling.R:217:7'): Resource cleanup after errors ────── `suppressWarnings(edge_load_model("nonexistent.gguf"))` threw an error with unexpected message. Expected match: "Failed to load GGUF model" Actual message: "Model file does not exist: nonexistent.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-error-handling.R:217:7 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. ├─base::suppressWarnings(edge_load_model("nonexistent.gguf")) 7. │ └─base::withCallingHandlers(...) 8. └─edgemodelr::edge_load_model("nonexistent.gguf") ── Failure ('test-integration.R:68:7'): Model listing and information consistency ── model$size_gb > 0 is not TRUE `actual`: `expected`: TRUE ── Failure ('test-integration.R:69:7'): Model listing and information consistency ── model$size_gb < 1000 is not TRUE `actual`: `expected`: TRUE Model size should be reasonable (< 1TB) ── Failure ('test-integration.R:73:7'): Model listing and information consistency ── nchar(model$description) > 10 is not TRUE `actual`: `expected`: TRUE ── Failure ('test-integration.R:68:7'): Model listing and information consistency ── model$size_gb > 0 is not TRUE `actual`: `expected`: TRUE ── Failure ('test-integration.R:69:7'): Model listing and information consistency ── model$size_gb < 1000 is not TRUE `actual`: `expected`: TRUE Model size should be reasonable (< 1TB) ── Failure ('test-integration.R:73:7'): Model listing and information consistency ── nchar(model$description) > 10 is not TRUE `actual`: `expected`: TRUE ── Failure ('test-integration.R:68:7'): Model listing and information consistency ── model$size_gb > 0 is not TRUE `actual`: `expected`: TRUE ── Failure ('test-integration.R:69:7'): Model listing and information consistency ── model$size_gb < 1000 is not TRUE `actual`: `expected`: TRUE Model size should be reasonable (< 1TB) ── Failure ('test-integration.R:73:7'): Model listing and information consistency ── nchar(model$description) > 10 is not TRUE `actual`: `expected`: TRUE ── Failure ('test-model-loading.R:10:5'): edge_list_models returns valid data ── "description" %in% colnames(models) is not TRUE `actual`: FALSE `expected`: TRUE ── Failure ('test-model-loading.R:15:5'): edge_load_model handles invalid paths ── `edge_load_model("nonexistent_model.gguf")` threw an error with unexpected message. Expected match: "Failed to load GGUF model" Actual message: "Model file does not exist: nonexistent_model.gguf" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-model-loading.R:15:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─edgemodelr::edge_load_model("nonexistent_model.gguf") ── Failure ('test-model-management.R:63:5'): edge_quick_setup parameter validation ── `edge_quick_setup(NULL)` threw an error with unexpected message. Expected match: "model_name must be a string" Actual message: "model_name cannot be empty" Backtrace: ▆ 1. ├─testthat::expect_error(edge_quick_setup(NULL), "model_name must be a string") at test-model-management.R:63:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─edgemodelr::edge_quick_setup(NULL) [ FAIL 25 | WARN 0 | SKIP 18 | PASS 81 ] Error: Test failures Execution halted