Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1"use strict";2var __create = Object.create;3var __defProp = Object.defineProperty;4var __getOwnPropDesc = Object.getOwnPropertyDescriptor;5var __getOwnPropNames = Object.getOwnPropertyNames;6var __getProtoOf = Object.getPrototypeOf;7var __hasOwnProp = Object.prototype.hasOwnProperty;8var __export = (target, all) => {9 for (var name in all)10 __defProp(target, name, { get: all[name], enumerable: true });11};12var __copyProps = (to, from, except, desc) => {13 if (from && typeof from === "object" || typeof from === "function") {14 for (let key of __getOwnPropNames(from))15 if (!__hasOwnProp.call(to, key) && key !== except)16 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });17 }18 return to;19};20var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(21 // If the importer is in node compatibility mode or this is not an ESM22 // file that has been converted to a CommonJS file using a Babel-23 // compatible transform (i.e. "__esModule" has not been set), then set24 // "default" to the CommonJS "module.exports" for node compatibility.25 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,26 mod27));28var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);29var testContext_exports = {};30__export(testContext_exports, {31 GeneratorJournal: () => GeneratorJournal,32 TestContext: () => TestContext33});34module.exports = __toCommonJS(testContext_exports);35var import_fs = __toESM(require("fs"));36var import_path = __toESM(require("path"));37var import_utils = require("playwright-core/lib/utils");38var import_base = require("../../reporters/base");39var import_list = __toESM(require("../../reporters/list"));40var import_streams = require("./streams");41var import_util = require("../../util");42var import_testRunner = require("../../runner/testRunner");43var import_seed = require("./seed");44class GeneratorJournal {45 constructor(rootPath, plan, seed) {46 this._rootPath = rootPath;47 this._plan = plan;48 this._seed = seed;49 this._steps = [];50 }51 logStep(title, code) {52 if (title)53 this._steps.push({ title, code });54 }55 journal() {56 const result = [];57 result.push(`# Plan`);58 result.push(this._plan);59 result.push(`# Seed file: ${import_path.default.relative(this._rootPath, this._seed.file)}`);60 result.push("```ts");61 result.push(this._seed.content);62 result.push("```");63 result.push(`# Steps`);64 result.push(this._steps.map((step) => `### ${step.title}65\`\`\`ts66${step.code}67\`\`\``).join("\n\n"));68 result.push(bestPracticesMarkdown);69 return result.join("\n\n");70 }71}72class TestContext {73 constructor(options) {74 this.options = options;75 }76 initialize(rootPath, configLocation) {77 this.configLocation = configLocation;78 this.rootPath = rootPath || configLocation.configDir;79 }80 existingTestRunner() {81 return this._testRunner;82 }83 async createTestRunner() {84 if (this._testRunner)85 await this._testRunner.stopTests();86 const testRunner = new import_testRunner.TestRunner(this.configLocation, {});87 await testRunner.initialize({});88 this._testRunner = testRunner;89 testRunner.on(import_testRunner.TestRunnerEvent.TestFilesChanged, (testFiles) => {90 this._testRunner?.emit(import_testRunner.TestRunnerEvent.TestFilesChanged, testFiles);91 });92 this._testRunner = testRunner;93 return testRunner;94 }95 async getOrCreateSeedFile(seedFile, projectName) {96 const configDir = this.configLocation.configDir;97 const testRunner = await this.createTestRunner();98 const config = await testRunner.loadConfig();99 const project = (0, import_seed.seedProject)(config, projectName);100 if (!seedFile) {101 seedFile = await (0, import_seed.ensureSeedTest)(project, false);102 } else {103 const candidateFiles = [];104 const testDir = project.project.testDir;105 candidateFiles.push(import_path.default.resolve(testDir, seedFile));106 candidateFiles.push(import_path.default.resolve(configDir, seedFile));107 candidateFiles.push(import_path.default.resolve(this.rootPath, seedFile));108 let resolvedSeedFile;109 for (const candidateFile of candidateFiles) {110 if (await (0, import_util.fileExistsAsync)(candidateFile)) {111 resolvedSeedFile = candidateFile;112 break;113 }114 }115 if (!resolvedSeedFile)116 throw new Error("seed test not found.");117 seedFile = resolvedSeedFile;118 }119 const seedFileContent = await import_fs.default.promises.readFile(seedFile, "utf8");120 return {121 file: seedFile,122 content: seedFileContent,123 projectName: project.project.name124 };125 }126 async runSeedTest(seedFile, projectName, progress) {127 const { screen } = this.createScreen(progress);128 const configDir = this.configLocation.configDir;129 const reporter = new import_list.default({ configDir, screen });130 const testRunner = await this.createTestRunner();131 const result = await testRunner.runTests(reporter, {132 headed: !this.options?.headless,133 locations: ["/" + (0, import_utils.escapeRegExp)(seedFile) + "/"],134 projects: [projectName],135 timeout: 0,136 workers: 1,137 pauseAtEnd: true,138 disableConfigReporters: true,139 failOnLoadErrors: true140 });141 if (result.status === "passed" && !reporter.suite?.allTests().length)142 throw new Error("seed test not found.");143 if (result.status !== "passed")144 throw new Error("Errors while running the seed test.");145 }146 createScreen(progress) {147 const stream = new import_streams.StringWriteStream(progress);148 const screen = {149 ...import_base.terminalScreen,150 isTTY: false,151 colors: import_utils.noColors,152 stdout: stream,153 stderr: stream154 };155 return { screen, stream };156 }157 async close() {158 }159}160const bestPracticesMarkdown = `161# Best practices162- Do not improvise, do not add directives that were not asked for163- Use clear, descriptive assertions to validate the expected behavior164- Use reliable locators from this log165- Use local variables for locators that are used multiple times166- Use Playwright waiting assertions and best practices from this log167- NEVER! use page.waitForLoadState()168- NEVER! use page.waitForNavigation()169- NEVER! use page.waitForTimeout()170- NEVER! use page.evaluate()171`;172// Annotate the CommonJS export names for ESM import in node:1730 && (module.exports = {174 GeneratorJournal,175 TestContext176});177 