Skip to content

Commit 7ba1571

Browse files
committed
Add torch module
1 parent f74a855 commit 7ba1571

5 files changed

Lines changed: 72 additions & 0 deletions

File tree

src/bundles/torch/manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"tabs": []
3+
}

src/bundles/torch/package.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "@sourceacademy/bundle-torch",
3+
"version": "1.0.0",
4+
"private": true,
5+
"dependencies": {
6+
"@veehz/torch": "^0.1.2"
7+
},
8+
"devDependencies": {
9+
"@sourceacademy/modules-buildtools": "workspace:^",
10+
"typescript": "^5.8.2"
11+
},
12+
"type": "module",
13+
"exports": {
14+
".": "./dist/index.js",
15+
"./*": "./dist/*.js"
16+
},
17+
"scripts": {
18+
"build": "buildtools build bundle .",
19+
"lint": "buildtools lint .",
20+
"tsc": "buildtools tsc .",
21+
"test": "buildtools test --project .",
22+
"postinstall": "buildtools compile",
23+
"serve": "yarn buildtools serve"
24+
},
25+
"scripts-info": {
26+
"build": "Compiles the given bundle to the output directory",
27+
"lint": "Runs ESlint on the code in the bundle",
28+
"serve": "Starts the modules server",
29+
"test": "Runs unit tests defined for the bundle",
30+
"tsc": "Runs the Typescript compiler and produces the library version of the bundle"
31+
}
32+
}

src/bundles/torch/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* Machine learning library based on PyTorch.
3+
*
4+
* @module torch
5+
* @author Vee Hua Zhi
6+
*/
7+
8+
export * from '@veehz/torch';

src/bundles/torch/tsconfig.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": [
4+
"./src"
5+
],
6+
"compilerOptions": {
7+
"outDir": "./dist"
8+
},
9+
"typedocOptions": {
10+
"name": "torch"
11+
}
12+
}

yarn.lock

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4166,6 +4166,16 @@ __metadata:
41664166
languageName: unknown
41674167
linkType: soft
41684168

4169+
"@sourceacademy/bundle-torch@workspace:src/bundles/torch":
4170+
version: 0.0.0-use.local
4171+
resolution: "@sourceacademy/bundle-torch@workspace:src/bundles/torch"
4172+
dependencies:
4173+
"@sourceacademy/modules-buildtools": "workspace:^"
4174+
"@veehz/torch": "npm:^0.1.2"
4175+
typescript: "npm:^5.8.2"
4176+
languageName: unknown
4177+
linkType: soft
4178+
41694179
"@sourceacademy/bundle-unittest@workspace:^, @sourceacademy/bundle-unittest@workspace:src/bundles/unittest":
41704180
version: 0.0.0-use.local
41714181
resolution: "@sourceacademy/bundle-unittest@workspace:src/bundles/unittest"
@@ -5846,6 +5856,13 @@ __metadata:
58465856
languageName: node
58475857
linkType: hard
58485858

5859+
"@veehz/torch@npm:^0.1.2":
5860+
version: 0.1.2
5861+
resolution: "@veehz/torch@npm:0.1.2"
5862+
checksum: 10c0/09e531a2ca7db3b3bd6e38a0ffde9667b90975f506093a817f05b4c92145c32a944cb8c3052fdbbcdc0a18bc4f48410693be6a0f569fceb54fa7ba348ca1fbe7
5863+
languageName: node
5864+
linkType: hard
5865+
58495866
"@vitejs/plugin-react@npm:^6.0.1":
58505867
version: 6.0.1
58515868
resolution: "@vitejs/plugin-react@npm:6.0.1"

0 commit comments

Comments
 (0)