Team Ai
Datasetpublic

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.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
teleEmitter.js298 linesDownload Raw Back to reporters
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 teleEmitter_exports = {};30__export(teleEmitter_exports, {31  TeleReporterEmitter: () => TeleReporterEmitter32});33module.exports = __toCommonJS(teleEmitter_exports);34var import_path = __toESM(require("path"));35var import_utils = require("playwright-core/lib/utils");36var import_teleReceiver = require("../isomorphic/teleReceiver");37class TeleReporterEmitter {38  constructor(messageSink, options = {}) {39    this._resultKnownAttachmentCounts = /* @__PURE__ */ new Map();40    // In case there is blob reporter and UI mode, make sure one does override41    // the id assigned by the other.42    this._idSymbol = Symbol("id");43    this._messageSink = messageSink;44    this._emitterOptions = options;45  }46  version() {47    return "v2";48  }49  onConfigure(config) {50    this._rootDir = config.rootDir;51    this._messageSink({ method: "onConfigure", params: { config: this._serializeConfig(config) } });52  }53  onBegin(suite) {54    const projects = suite.suites.map((projectSuite) => this._serializeProject(projectSuite));55    for (const project of projects)56      this._messageSink({ method: "onProject", params: { project } });57    this._messageSink({ method: "onBegin", params: void 0 });58  }59  onTestBegin(test, result) {60    result[this._idSymbol] = (0, import_utils.createGuid)();61    this._messageSink({62      method: "onTestBegin",63      params: {64        testId: test.id,65        result: this._serializeResultStart(result)66      }67    });68  }69  onTestEnd(test, result) {70    const testEnd = {71      testId: test.id,72      expectedStatus: test.expectedStatus,73      timeout: test.timeout,74      annotations: []75    };76    this._sendNewAttachments(result, test.id);77    this._messageSink({78      method: "onTestEnd",79      params: {80        test: testEnd,81        result: this._serializeResultEnd(result)82      }83    });84    this._resultKnownAttachmentCounts.delete(result[this._idSymbol]);85  }86  onStepBegin(test, result, step) {87    step[this._idSymbol] = (0, import_utils.createGuid)();88    this._messageSink({89      method: "onStepBegin",90      params: {91        testId: test.id,92        resultId: result[this._idSymbol],93        step: this._serializeStepStart(step)94      }95    });96  }97  onStepEnd(test, result, step) {98    const resultId = result[this._idSymbol];99    this._sendNewAttachments(result, test.id);100    this._messageSink({101      method: "onStepEnd",102      params: {103        testId: test.id,104        resultId,105        step: this._serializeStepEnd(step, result)106      }107    });108  }109  onError(error) {110    this._messageSink({111      method: "onError",112      params: { error }113    });114  }115  onStdOut(chunk, test, result) {116    this._onStdIO("stdout", chunk, test, result);117  }118  onStdErr(chunk, test, result) {119    this._onStdIO("stderr", chunk, test, result);120  }121  _onStdIO(type, chunk, test, result) {122    if (this._emitterOptions.omitOutput)123      return;124    const isBase64 = typeof chunk !== "string";125    const data = isBase64 ? chunk.toString("base64") : chunk;126    this._messageSink({127      method: "onStdIO",128      params: { testId: test?.id, resultId: result ? result[this._idSymbol] : void 0, type, data, isBase64 }129    });130  }131  async onEnd(result) {132    const resultPayload = {133      status: result.status,134      startTime: result.startTime.getTime(),135      duration: result.duration136    };137    this._messageSink({138      method: "onEnd",139      params: {140        result: resultPayload141      }142    });143  }144  printsToStdio() {145    return false;146  }147  _serializeConfig(config) {148    return {149      configFile: this._relativePath(config.configFile),150      globalTimeout: config.globalTimeout,151      maxFailures: config.maxFailures,152      metadata: config.metadata,153      rootDir: config.rootDir,154      version: config.version,155      workers: config.workers,156      globalSetup: config.globalSetup,157      globalTeardown: config.globalTeardown158    };159  }160  _serializeProject(suite) {161    const project = suite.project();162    const report = {163      metadata: project.metadata,164      name: project.name,165      outputDir: this._relativePath(project.outputDir),166      repeatEach: project.repeatEach,167      retries: project.retries,168      testDir: this._relativePath(project.testDir),169      testIgnore: (0, import_teleReceiver.serializeRegexPatterns)(project.testIgnore),170      testMatch: (0, import_teleReceiver.serializeRegexPatterns)(project.testMatch),171      timeout: project.timeout,172      suites: suite.suites.map((fileSuite) => {173        return this._serializeSuite(fileSuite);174      }),175      grep: (0, import_teleReceiver.serializeRegexPatterns)(project.grep),176      grepInvert: (0, import_teleReceiver.serializeRegexPatterns)(project.grepInvert || []),177      dependencies: project.dependencies,178      snapshotDir: this._relativePath(project.snapshotDir),179      teardown: project.teardown,180      use: this._serializeProjectUseOptions(project.use)181    };182    return report;183  }184  _serializeProjectUseOptions(use) {185    return {186      testIdAttribute: use.testIdAttribute187    };188  }189  _serializeSuite(suite) {190    const result = {191      title: suite.title,192      location: this._relativeLocation(suite.location),193      entries: suite.entries().map((e) => {194        if (e.type === "test")195          return this._serializeTest(e);196        return this._serializeSuite(e);197      })198    };199    return result;200  }201  _serializeTest(test) {202    return {203      testId: test.id,204      title: test.title,205      location: this._relativeLocation(test.location),206      retries: test.retries,207      tags: test.tags,208      repeatEachIndex: test.repeatEachIndex,209      annotations: this._relativeAnnotationLocations(test.annotations)210    };211  }212  _serializeResultStart(result) {213    return {214      id: result[this._idSymbol],215      retry: result.retry,216      workerIndex: result.workerIndex,217      parallelIndex: result.parallelIndex,218      startTime: +result.startTime219    };220  }221  _serializeResultEnd(result) {222    return {223      id: result[this._idSymbol],224      duration: result.duration,225      status: result.status,226      errors: result.errors,227      annotations: result.annotations?.length ? this._relativeAnnotationLocations(result.annotations) : void 0228    };229  }230  _sendNewAttachments(result, testId) {231    const resultId = result[this._idSymbol];232    const knownAttachmentCount = this._resultKnownAttachmentCounts.get(resultId) ?? 0;233    if (result.attachments.length > knownAttachmentCount) {234      this._messageSink({235        method: "onAttach",236        params: {237          testId,238          resultId,239          attachments: this._serializeAttachments(result.attachments.slice(knownAttachmentCount))240        }241      });242    }243    this._resultKnownAttachmentCounts.set(resultId, result.attachments.length);244  }245  _serializeAttachments(attachments) {246    return attachments.map((a) => {247      const { body, ...rest } = a;248      return {249        ...rest,250        // There is no Buffer in the browser, so there is no point in sending the data there.251        base64: body && !this._emitterOptions.omitBuffers ? body.toString("base64") : void 0252      };253    });254  }255  _serializeStepStart(step) {256    return {257      id: step[this._idSymbol],258      parentStepId: step.parent?.[this._idSymbol],259      title: step.title,260      category: step.category,261      startTime: +step.startTime,262      location: this._relativeLocation(step.location)263    };264  }265  _serializeStepEnd(step, result) {266    return {267      id: step[this._idSymbol],268      duration: step.duration,269      error: step.error,270      attachments: step.attachments.length ? step.attachments.map((a) => result.attachments.indexOf(a)) : void 0,271      annotations: step.annotations.length ? this._relativeAnnotationLocations(step.annotations) : void 0272    };273  }274  _relativeAnnotationLocations(annotations) {275    return annotations.map((annotation) => ({276      ...annotation,277      location: annotation.location ? this._relativeLocation(annotation.location) : void 0278    }));279  }280  _relativeLocation(location) {281    if (!location)282      return location;283    return {284      ...location,285      file: this._relativePath(location.file)286    };287  }288  _relativePath(absolutePath) {289    if (!absolutePath)290      return absolutePath;291    return import_path.default.relative(this._rootDir, absolutePath);292  }293}294// Annotate the CommonJS export names for ESM import in node:2950 && (module.exports = {296  TeleReporterEmitter297});298 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai