Skip to content

Commit

Permalink
discojs*: rm *Loader & DatasetBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
tharvik committed Aug 22, 2024
1 parent 9b2c676 commit a85cb4d
Show file tree
Hide file tree
Showing 23 changed files with 15 additions and 731 deletions.
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ npm -w cli start -- --help # or -h
The CLI can be used on several pre-defined tasks: titanic, simple-face and CIFAR10. In order
to understand how to add a new task have a look at [TASK.md](../docs/TASK.md).

Once a new task has been defined in `discojs`, it can be loaded in [data.ts](./src/data.ts) as it is already implemented for current tasks. There are currently [multiple classes](../discojs-node/src/dataset/data_loader) you can use to load data using Node.js and preprocess data: ImageLoader, TabularLoader and TextLoader.
Once a new task has been defined in `discojs`, it can be loaded in [data.ts](./src/data.ts) as it is already implemented for current tasks. There are currently [multiple classes](../discojs-node/src/loaders) you can use to load data using Node.js and preprocess data: loadImagesInDir, loadCSV and loadText.
Once a function to load data has been added, make sure to extend `getTaskData` in `data.ts`, which matches each task with it respective with data loading function.

The last thing to add is to add the task as a CLI argument in [args.ts](./src/args.ts) to the `supportedTasks` Map.
Expand Down
151 changes: 0 additions & 151 deletions discojs-node/src/data/image_loader.spec.ts

This file was deleted.

14 changes: 0 additions & 14 deletions discojs-node/src/data/image_loader.ts

This file was deleted.

3 changes: 0 additions & 3 deletions discojs-node/src/data/index.ts

This file was deleted.

57 changes: 0 additions & 57 deletions discojs-node/src/data/tabular_loader.spec.ts

This file was deleted.

14 changes: 0 additions & 14 deletions discojs-node/src/data/tabular_loader.ts

This file was deleted.

16 changes: 0 additions & 16 deletions discojs-node/src/data/text_loader.ts

This file was deleted.

1 change: 0 additions & 1 deletion discojs-node/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './data/index.js'
export * from './loaders/index.js'
export { saveModelToDisk, loadModelFromDisk } from './model_loader.js'
9 changes: 0 additions & 9 deletions discojs-web/src/data/image_loader.ts

This file was deleted.

3 changes: 0 additions & 3 deletions discojs-web/src/data/index.ts

This file was deleted.

10 changes: 0 additions & 10 deletions discojs-web/src/data/tabular_loader.ts

This file was deleted.

11 changes: 0 additions & 11 deletions discojs-web/src/data/text_loader.ts

This file was deleted.

1 change: 0 additions & 1 deletion discojs-web/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './data/index.js'
export * from "./loaders/index.js";
export * from "./memory/index.js";
3 changes: 2 additions & 1 deletion discojs/src/dataset/data/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import type {
} from "../../index.js";
import { convertors } from "../../index.js";

import { Data, DataSplit, ImageData, TabularData, TextData } from "./index.js";
import { Data, ImageData, TabularData, TextData } from "./index.js";
import { DataSplit } from "./data_split.js";

// Array.fromAsync not yet widely used (2024)
async function arrayFromAsync<T>(iter: AsyncIterable<T>): Promise<T[]> {
Expand Down
1 change: 0 additions & 1 deletion discojs/src/dataset/data/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export type { DataSplit } from './data_split.js'
export { Data } from './data.js'
export { ImageData } from './image_data.js'
export { TabularData } from './tabular_data.js'
Expand Down
18 changes: 0 additions & 18 deletions discojs/src/dataset/data_loader/data_loader.ts

This file was deleted.

Loading

0 comments on commit a85cb4d

Please sign in to comment.