@epfml/discojs-web 3.0.1-p20250924150135.0 → 3.0.1-p20251023134333.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,3 +6,4 @@ import { models } from '@epfml/discojs';
6
6
  * @returns A HellaSwagDataset containing the examples
7
7
  */
8
8
  export declare function load(limit?: number): Promise<models.HellaSwagDataset>;
9
+ //# sourceMappingURL=hellaswag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hellaswag.d.ts","sourceRoot":"","sources":["../src/hellaswag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,IAAI,CAAC,KAAK,SAAK,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CA0BvE"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./loaders/index.js";
2
2
  export { load as loadHellaSwag } from "./hellaswag.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  import { Dataset } from "@epfml/discojs";
2
2
  export declare function load(file: File): Dataset<Partial<Record<string, string>>>;
3
+ //# sourceMappingURL=csv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../../src/loaders/csv.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAazC,wBAAgB,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CA4BzE"}
@@ -20,7 +20,8 @@ export function load(file) {
20
20
  skipEmptyLines: true, // TODO needed to avoid parsing last empty line
21
21
  complete(results) {
22
22
  if (results.errors.length > 0) {
23
- reject(results.errors);
23
+ const error = results.errors[0];
24
+ reject(new Error(error.message));
24
25
  return;
25
26
  }
26
27
  const rows = results.data.map((row) => {
@@ -1,2 +1,3 @@
1
1
  import { Image as DiscoImage } from "@epfml/discojs";
2
2
  export declare function load(file: Blob): Promise<DiscoImage<4>>;
3
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/loaders/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAErD,wBAAsB,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAe7D"}
@@ -1,3 +1,4 @@
1
1
  export { load as loadCSV } from "./csv.js";
2
2
  export { load as loadImage } from "./image.js";
3
3
  export { load as loadText } from "./text.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/loaders/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAA"}
@@ -1,2 +1,3 @@
1
1
  import { Dataset, Text } from "@epfml/discojs";
2
2
  export declare function load(file: Blob): Dataset<Text>;
3
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/loaders/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE/C,wBAAgB,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAa9C"}
package/package.json CHANGED
@@ -1,31 +1,30 @@
1
1
  {
2
- "name": "@epfml/discojs-web",
3
- "version": "3.0.1-p20250924150135.0",
4
- "type": "module",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "watch": "nodemon --ext ts --ignore dist --watch ../discojs/dist --watch . --exec npm run",
9
- "build": "tsc",
10
- "lint": "npx eslint .",
11
- "test": "cd .. && vitest --run --project=discojs-web"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/epfml/disco.git"
16
- },
17
- "bugs": {
18
- "url": "https://github.com/epfml/disco/issues"
19
- },
20
- "homepage": "https://github.com/epfml/disco#readme",
21
- "dependencies": {
22
- "@epfml/discojs": "*",
23
- "@tensorflow/tfjs": "4",
24
- "papaparse": "5"
25
- },
26
- "devDependencies": {
27
- "@types/papaparse": "5",
28
- "jsdom": "26",
29
- "nodemon": "3"
30
- }
2
+ "name": "@epfml/discojs-web",
3
+ "version": "3.0.1-p20251023134333.0",
4
+ "type": "module",
5
+ "exports": "./dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "watch": "nodemon --ext ts --ignore dist --watch ../discojs/dist --watch . --exec npm run",
9
+ "build": "tsc --build",
10
+ "test": "cd .. && vitest --run --project=discojs-web"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/epfml/disco.git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/epfml/disco/issues"
18
+ },
19
+ "homepage": "https://github.com/epfml/disco#readme",
20
+ "dependencies": {
21
+ "@epfml/discojs": "*",
22
+ "@tensorflow/tfjs": "4",
23
+ "papaparse": "5"
24
+ },
25
+ "devDependencies": {
26
+ "@types/papaparse": "5",
27
+ "jsdom": "27",
28
+ "nodemon": "3"
29
+ }
31
30
  }