mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-05-31 17:53:59 +00:00
Add multithreaded logging infrastructure for preparation for future designs (#225)
* Update class diagrams * Implement BoundedChannel and multithreaded logging infra * Integrate logging channel system * Update string concatenations to use std::format * Add pretty print log
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "data_generation/data_generator.h"
|
||||
#include "data_generation/prompt_formatting/prompt_formatter.h"
|
||||
#include "data_model/models.h"
|
||||
#include "services/logging/logger.h"
|
||||
|
||||
struct llama_model;
|
||||
struct llama_context;
|
||||
@@ -37,7 +38,7 @@ class LlamaGenerator final : public DataGenerator {
|
||||
* @param prompt_directory Directory service for loading named prompt files.
|
||||
*/
|
||||
LlamaGenerator(const ApplicationOptions& options,
|
||||
const std::string& model_path,
|
||||
const std::string& model_path, std::shared_ptr<ILogger> logger,
|
||||
std::unique_ptr<IPromptFormatter> prompt_formatter,
|
||||
std::unique_ptr<IPromptDirectory> prompt_directory);
|
||||
|
||||
@@ -130,6 +131,7 @@ class LlamaGenerator final : public DataGenerator {
|
||||
std::mt19937 rng_;
|
||||
uint32_t n_ctx_ = kDefaultContextSize;
|
||||
int n_gpu_layers_ = 0;
|
||||
std::shared_ptr<ILogger> logger_;
|
||||
std::unique_ptr<IPromptFormatter> prompt_formatter_;
|
||||
std::unique_ptr<IPromptDirectory> prompt_directory_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user