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 __defProp = Object.defineProperty;3var __getOwnPropDesc = Object.getOwnPropertyDescriptor;4var __getOwnPropNames = Object.getOwnPropertyNames;5var __hasOwnProp = Object.prototype.hasOwnProperty;6var __export = (target, all) => {7 for (var name in all)8 __defProp(target, name, { get: all[name], enumerable: true });9};10var __copyProps = (to, from, except, desc) => {11 if (from && typeof from === "object" || typeof from === "function") {12 for (let key of __getOwnPropNames(from))13 if (!__hasOwnProp.call(to, key) && key !== except)14 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });15 }16 return to;17};18var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);19var fixtureRunner_exports = {};20__export(fixtureRunner_exports, {21 FixtureRunner: () => FixtureRunner22});23module.exports = __toCommonJS(fixtureRunner_exports);24var import_utils = require("playwright-core/lib/utils");25var import_fixtures = require("../common/fixtures");26var import_util = require("../util");27class Fixture {28 constructor(runner, registration) {29 this.failed = false;30 this._deps = /* @__PURE__ */ new Set();31 this._usages = /* @__PURE__ */ new Set();32 this.runner = runner;33 this.registration = registration;34 this.value = null;35 const isUserFixture = this.registration.location && (0, import_util.filterStackFile)(this.registration.location.file);36 const title = this.registration.customTitle || this.registration.name;37 const location = isUserFixture ? this.registration.location : void 0;38 this._stepInfo = { title: `Fixture ${(0, import_utils.escapeWithQuotes)(title, '"')}`, category: "fixture", location };39 if (this.registration.box === "self")40 this._stepInfo = void 0;41 else if (this.registration.box)42 this._stepInfo.group = isUserFixture ? "configuration" : "internal";43 this._setupDescription = {44 title,45 phase: "setup",46 location,47 slot: this.registration.timeout === void 0 ? void 0 : {48 timeout: this.registration.timeout,49 elapsed: 050 }51 };52 this._teardownDescription = { ...this._setupDescription, phase: "teardown" };53 }54 async setup(testInfo, runnable) {55 this.runner.instanceForId.set(this.registration.id, this);56 if (typeof this.registration.fn !== "function") {57 this.value = this.registration.fn;58 return;59 }60 const run = () => testInfo._runWithTimeout({ ...runnable, fixture: this._setupDescription }, () => this._setupInternal(testInfo));61 if (this._stepInfo)62 await testInfo._runAsStep(this._stepInfo, run);63 else64 await run();65 }66 async _setupInternal(testInfo) {67 const params = {};68 for (const name of this.registration.deps) {69 const registration = this.runner.pool.resolve(name, this.registration);70 const dep = this.runner.instanceForId.get(registration.id);71 if (!dep) {72 this.failed = true;73 return;74 }75 dep._usages.add(this);76 this._deps.add(dep);77 params[name] = dep.value;78 if (dep.failed) {79 this.failed = true;80 return;81 }82 }83 let called = false;84 const useFuncStarted = new import_utils.ManualPromise();85 const useFunc = async (value) => {86 if (called)87 throw new Error(`Cannot provide fixture value for the second time`);88 called = true;89 this.value = value;90 this._useFuncFinished = new import_utils.ManualPromise();91 useFuncStarted.resolve();92 await this._useFuncFinished;93 };94 const workerInfo = { config: testInfo.config, parallelIndex: testInfo.parallelIndex, workerIndex: testInfo.workerIndex, project: testInfo.project };95 const info = this.registration.scope === "worker" ? workerInfo : testInfo;96 this._selfTeardownComplete = (async () => {97 try {98 await this.registration.fn(params, useFunc, info);99 if (!useFuncStarted.isDone())100 throw new Error(`use() was not called in fixture "${this.registration.name}"`);101 } catch (error) {102 this.failed = true;103 if (!useFuncStarted.isDone())104 useFuncStarted.reject(error);105 else106 throw error;107 }108 })();109 await useFuncStarted;110 }111 async teardown(testInfo, runnable) {112 try {113 const fixtureRunnable = { ...runnable, fixture: this._teardownDescription };114 if (!testInfo._timeoutManager.isTimeExhaustedFor(fixtureRunnable)) {115 const run = () => testInfo._runWithTimeout(fixtureRunnable, () => this._teardownInternal());116 if (this._stepInfo)117 await testInfo._runAsStep(this._stepInfo, run);118 else119 await run();120 }121 } finally {122 for (const dep of this._deps)123 dep._usages.delete(this);124 this.runner.instanceForId.delete(this.registration.id);125 }126 }127 async _teardownInternal() {128 if (typeof this.registration.fn !== "function")129 return;130 if (this._usages.size !== 0) {131 console.error("Internal error: fixture integrity at", this._teardownDescription.title);132 this._usages.clear();133 }134 if (this._useFuncFinished) {135 this._useFuncFinished.resolve();136 this._useFuncFinished = void 0;137 await this._selfTeardownComplete;138 }139 }140 _collectFixturesInTeardownOrder(scope, collector) {141 if (this.registration.scope !== scope)142 return;143 for (const fixture of this._usages)144 fixture._collectFixturesInTeardownOrder(scope, collector);145 collector.add(this);146 }147}148class FixtureRunner {149 constructor() {150 this.testScopeClean = true;151 this.instanceForId = /* @__PURE__ */ new Map();152 }153 setPool(pool) {154 if (!this.testScopeClean)155 throw new Error("Did not teardown test scope");156 if (this.pool && pool.digest !== this.pool.digest) {157 throw new Error([158 `Playwright detected inconsistent test.use() options.`,159 `Most common mistakes that lead to this issue:`,160 ` - Calling test.use() outside of the test file, for example in a common helper.`,161 ` - One test file imports from another test file.`162 ].join("\n"));163 }164 this.pool = pool;165 }166 _collectFixturesInSetupOrder(registration, collector) {167 if (collector.has(registration))168 return;169 for (const name of registration.deps) {170 const dep = this.pool.resolve(name, registration);171 this._collectFixturesInSetupOrder(dep, collector);172 }173 collector.add(registration);174 }175 async teardownScope(scope, testInfo, runnable) {176 const fixtures = Array.from(this.instanceForId.values()).reverse();177 const collector = /* @__PURE__ */ new Set();178 for (const fixture of fixtures)179 fixture._collectFixturesInTeardownOrder(scope, collector);180 let firstError;181 for (const fixture of collector) {182 try {183 await fixture.teardown(testInfo, runnable);184 } catch (error) {185 firstError = firstError ?? error;186 }187 }188 if (scope === "test")189 this.testScopeClean = true;190 if (firstError)191 throw firstError;192 }193 async resolveParametersForFunction(fn, testInfo, autoFixtures, runnable) {194 const collector = /* @__PURE__ */ new Set();195 const auto = [];196 for (const registration of this.pool.autoFixtures()) {197 let shouldRun = true;198 if (autoFixtures === "all-hooks-only")199 shouldRun = registration.scope === "worker" || registration.auto === "all-hooks-included";200 else if (autoFixtures === "worker")201 shouldRun = registration.scope === "worker";202 if (shouldRun)203 auto.push(registration);204 }205 auto.sort((r1, r2) => (r1.scope === "worker" ? 0 : 1) - (r2.scope === "worker" ? 0 : 1));206 for (const registration of auto)207 this._collectFixturesInSetupOrder(registration, collector);208 const names = getRequiredFixtureNames(fn);209 for (const name of names)210 this._collectFixturesInSetupOrder(this.pool.resolve(name), collector);211 for (const registration of collector)212 await this._setupFixtureForRegistration(registration, testInfo, runnable);213 const params = {};214 for (const name of names) {215 const registration = this.pool.resolve(name);216 const fixture = this.instanceForId.get(registration.id);217 if (!fixture || fixture.failed)218 return null;219 params[name] = fixture.value;220 }221 return params;222 }223 async resolveParametersAndRunFunction(fn, testInfo, autoFixtures, runnable) {224 const params = await this.resolveParametersForFunction(fn, testInfo, autoFixtures, runnable);225 if (params === null) {226 return null;227 }228 await testInfo._runWithTimeout(runnable, () => fn(params, testInfo));229 }230 async _setupFixtureForRegistration(registration, testInfo, runnable) {231 if (registration.scope === "test")232 this.testScopeClean = false;233 let fixture = this.instanceForId.get(registration.id);234 if (fixture)235 return fixture;236 fixture = new Fixture(this, registration);237 await fixture.setup(testInfo, runnable);238 return fixture;239 }240 dependsOnWorkerFixturesOnly(fn, location) {241 const names = getRequiredFixtureNames(fn, location);242 for (const name of names) {243 const registration = this.pool.resolve(name);244 if (registration.scope !== "worker")245 return false;246 }247 return true;248 }249}250function getRequiredFixtureNames(fn, location) {251 return (0, import_fixtures.fixtureParameterNames)(fn, location ?? { file: "<unknown>", line: 1, column: 1 }, (e) => {252 throw new Error(`${(0, import_util.formatLocation)(e.location)}: ${e.message}`);253 });254}255// Annotate the CommonJS export names for ESM import in node:2560 && (module.exports = {257 FixtureRunner258});259 