Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@huggingface/inference

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@huggingface/inference - npm Package Compare versions

Comparing version 2.5.1 to 2.5.2

4

./dist/index.js

@@ -561,5 +561,5 @@ /// <reference path="./index.d.ts" />

};
isValidOutput = Array.isArray(res) && isNumArrayRec(res, 2, 0);
isValidOutput = Array.isArray(res) && isNumArrayRec(res, 3, 0);
if (!isValidOutput) {
throw new InferenceOutputError("Expected Array<number[][] | number[] | number>");
throw new InferenceOutputError("Expected Array<number[][][] | number[][] | number[] | number>");
}

@@ -566,0 +566,0 @@ return res;

@@ -512,3 +512,3 @@ export interface Options {

/**
* Returned values are a list of floats, or a list of list of floats, or a list of list of list of floats (depending on if you sent a string or a list of string, and if the automatic reduction, usually mean_pooling for instance was applied for you or not. This should be explained on the model's README.
* Returned values are a multidimensional array of floats (dimension depending on if you sent a string or a list of string, and if the automatic reduction, usually mean_pooling for instance was applied for you or not. This should be explained on the model's README).
*/

@@ -515,0 +515,0 @@ export type FeatureExtractionOutput = (number | number[] | number[][])[];

@@ -561,5 +561,5 @@ /// <reference path="./index.d.ts" />

};
isValidOutput = Array.isArray(res) && isNumArrayRec(res, 2, 0);
isValidOutput = Array.isArray(res) && isNumArrayRec(res, 3, 0);
if (!isValidOutput) {
throw new InferenceOutputError("Expected Array<number[][] | number[] | number>");
throw new InferenceOutputError("Expected Array<number[][][] | number[][] | number[] | number>");
}

@@ -566,0 +566,0 @@ return res;

{
"name": "@huggingface/inference",
"version": "2.5.1",
"version": "2.5.2",
"packageManager": "pnpm@8.3.1",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -17,3 +17,3 @@ import { InferenceOutputError } from "../../lib/InferenceOutputError";

/**
* Returned values are a list of floats, or a list of list of floats, or a list of list of list of floats (depending on if you sent a string or a list of string, and if the automatic reduction, usually mean_pooling for instance was applied for you or not. This should be explained on the model's README.
* Returned values are a multidimensional array of floats (dimension depending on if you sent a string or a list of string, and if the automatic reduction, usually mean_pooling for instance was applied for you or not. This should be explained on the model's README).
*/

@@ -50,8 +50,8 @@ export type FeatureExtractionOutput = (number | number[] | number[][])[];

isValidOutput = Array.isArray(res) && isNumArrayRec(res, 2, 0);
isValidOutput = Array.isArray(res) && isNumArrayRec(res, 3, 0);
if (!isValidOutput) {
throw new InferenceOutputError("Expected Array<number[][] | number[] | number>");
throw new InferenceOutputError("Expected Array<number[][][] | number[][] | number[] | number>");
}
return res;
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc