pranay143342
commited on
Commit
•
36c9740
1
Parent(s):
6372eb9
Training in progress, epoch 1
Browse files- .eslintrc.js +25 -0
- .gitignore +56 -0
- .prettierrc +4 -0
- README.md +85 -0
- config.json +25 -25
- model.safetensors +1 -1
- nest-cli.json +8 -0
- package-lock.json +0 -0
- package.json +69 -0
- special_tokens_map.json +7 -7
- src/app.controller.spec.ts +22 -0
- src/app.controller.ts +13 -0
- src/app.module.ts +10 -0
- src/app.service.ts +8 -0
- src/main.ts +9 -0
- test/app.e2e-spec.ts +24 -0
- test/jest-e2e.json +9 -0
- tokenizer_config.json +55 -55
- training_args.bin +1 -1
- tsconfig.build.json +4 -0
- tsconfig.json +21 -0
.eslintrc.js
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
module.exports = {
|
2 |
+
parser: '@typescript-eslint/parser',
|
3 |
+
parserOptions: {
|
4 |
+
project: 'tsconfig.json',
|
5 |
+
tsconfigRootDir: __dirname,
|
6 |
+
sourceType: 'module',
|
7 |
+
},
|
8 |
+
plugins: ['@typescript-eslint/eslint-plugin'],
|
9 |
+
extends: [
|
10 |
+
'plugin:@typescript-eslint/recommended',
|
11 |
+
'plugin:prettier/recommended',
|
12 |
+
],
|
13 |
+
root: true,
|
14 |
+
env: {
|
15 |
+
node: true,
|
16 |
+
jest: true,
|
17 |
+
},
|
18 |
+
ignorePatterns: ['.eslintrc.js'],
|
19 |
+
rules: {
|
20 |
+
'@typescript-eslint/interface-name-prefix': 'off',
|
21 |
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
22 |
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
23 |
+
'@typescript-eslint/no-explicit-any': 'off',
|
24 |
+
},
|
25 |
+
};
|
.gitignore
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# compiled output
|
2 |
+
/dist
|
3 |
+
/node_modules
|
4 |
+
/build
|
5 |
+
|
6 |
+
# Logs
|
7 |
+
logs
|
8 |
+
*.log
|
9 |
+
npm-debug.log*
|
10 |
+
pnpm-debug.log*
|
11 |
+
yarn-debug.log*
|
12 |
+
yarn-error.log*
|
13 |
+
lerna-debug.log*
|
14 |
+
|
15 |
+
# OS
|
16 |
+
.DS_Store
|
17 |
+
|
18 |
+
# Tests
|
19 |
+
/coverage
|
20 |
+
/.nyc_output
|
21 |
+
|
22 |
+
# IDEs and editors
|
23 |
+
/.idea
|
24 |
+
.project
|
25 |
+
.classpath
|
26 |
+
.c9/
|
27 |
+
*.launch
|
28 |
+
.settings/
|
29 |
+
*.sublime-workspace
|
30 |
+
|
31 |
+
# IDE - VSCode
|
32 |
+
.vscode/*
|
33 |
+
!.vscode/settings.json
|
34 |
+
!.vscode/tasks.json
|
35 |
+
!.vscode/launch.json
|
36 |
+
!.vscode/extensions.json
|
37 |
+
|
38 |
+
# dotenv environment variable files
|
39 |
+
.env
|
40 |
+
.env.development.local
|
41 |
+
.env.test.local
|
42 |
+
.env.production.local
|
43 |
+
.env.local
|
44 |
+
|
45 |
+
# temp directory
|
46 |
+
.temp
|
47 |
+
.tmp
|
48 |
+
|
49 |
+
# Runtime data
|
50 |
+
pids
|
51 |
+
*.pid
|
52 |
+
*.seed
|
53 |
+
*.pid.lock
|
54 |
+
|
55 |
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
56 |
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
.prettierrc
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"singleQuote": true,
|
3 |
+
"trailingComma": "all"
|
4 |
+
}
|
README.md
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<p align="center">
|
2 |
+
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
|
3 |
+
</p>
|
4 |
+
|
5 |
+
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
|
6 |
+
[circleci-url]: https://circleci.com/gh/nestjs/nest
|
7 |
+
|
8 |
+
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
|
9 |
+
<p align="center">
|
10 |
+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
|
11 |
+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
|
12 |
+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
|
13 |
+
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
|
14 |
+
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
|
15 |
+
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
16 |
+
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
17 |
+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
|
18 |
+
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
|
19 |
+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
|
20 |
+
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
|
21 |
+
</p>
|
22 |
+
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
|
23 |
+
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
|
24 |
+
|
25 |
+
## Description
|
26 |
+
|
27 |
+
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
|
28 |
+
|
29 |
+
## Project setup
|
30 |
+
|
31 |
+
```bash
|
32 |
+
$ npm install
|
33 |
+
```
|
34 |
+
|
35 |
+
## Compile and run the project
|
36 |
+
|
37 |
+
```bash
|
38 |
+
# development
|
39 |
+
$ npm run start
|
40 |
+
|
41 |
+
# watch mode
|
42 |
+
$ npm run start:dev
|
43 |
+
|
44 |
+
# production mode
|
45 |
+
$ npm run start:prod
|
46 |
+
```
|
47 |
+
|
48 |
+
## Run tests
|
49 |
+
|
50 |
+
```bash
|
51 |
+
# unit tests
|
52 |
+
$ npm run test
|
53 |
+
|
54 |
+
# e2e tests
|
55 |
+
$ npm run test:e2e
|
56 |
+
|
57 |
+
# test coverage
|
58 |
+
$ npm run test:cov
|
59 |
+
```
|
60 |
+
|
61 |
+
## Resources
|
62 |
+
|
63 |
+
Check out a few resources that may come in handy when working with NestJS:
|
64 |
+
|
65 |
+
- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
|
66 |
+
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
|
67 |
+
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
|
68 |
+
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
|
69 |
+
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
|
70 |
+
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
|
71 |
+
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).
|
72 |
+
|
73 |
+
## Support
|
74 |
+
|
75 |
+
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
|
76 |
+
|
77 |
+
## Stay in touch
|
78 |
+
|
79 |
+
- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
|
80 |
+
- Website - [https://nestjs.com](https://nestjs.com/)
|
81 |
+
- Twitter - [@nestframework](https://twitter.com/nestframework)
|
82 |
+
|
83 |
+
## License
|
84 |
+
|
85 |
+
Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
|
config.json
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
{
|
2 |
-
"_name_or_path": "distilbert-base-uncased",
|
3 |
-
"activation": "gelu",
|
4 |
-
"architectures": [
|
5 |
-
"DistilBertForSequenceClassification"
|
6 |
-
],
|
7 |
-
"attention_dropout": 0.1,
|
8 |
-
"dim": 768,
|
9 |
-
"dropout": 0.1,
|
10 |
-
"hidden_dim": 3072,
|
11 |
-
"initializer_range": 0.02,
|
12 |
-
"max_position_embeddings": 512,
|
13 |
-
"model_type": "distilbert",
|
14 |
-
"n_heads": 12,
|
15 |
-
"n_layers": 6,
|
16 |
-
"pad_token_id": 0,
|
17 |
-
"problem_type": "single_label_classification",
|
18 |
-
"qa_dropout": 0.1,
|
19 |
-
"seq_classif_dropout": 0.2,
|
20 |
-
"sinusoidal_pos_embds": false,
|
21 |
-
"tie_weights_": true,
|
22 |
-
"torch_dtype": "float32",
|
23 |
-
"transformers_version": "4.44.2",
|
24 |
-
"vocab_size": 30522
|
25 |
-
}
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "distilbert-base-uncased",
|
3 |
+
"activation": "gelu",
|
4 |
+
"architectures": [
|
5 |
+
"DistilBertForSequenceClassification"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.1,
|
8 |
+
"dim": 768,
|
9 |
+
"dropout": 0.1,
|
10 |
+
"hidden_dim": 3072,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"max_position_embeddings": 512,
|
13 |
+
"model_type": "distilbert",
|
14 |
+
"n_heads": 12,
|
15 |
+
"n_layers": 6,
|
16 |
+
"pad_token_id": 0,
|
17 |
+
"problem_type": "single_label_classification",
|
18 |
+
"qa_dropout": 0.1,
|
19 |
+
"seq_classif_dropout": 0.2,
|
20 |
+
"sinusoidal_pos_embds": false,
|
21 |
+
"tie_weights_": true,
|
22 |
+
"torch_dtype": "float32",
|
23 |
+
"transformers_version": "4.44.2",
|
24 |
+
"vocab_size": 30522
|
25 |
+
}
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 267832560
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:58787368eac7dc3420549b11942ba3e0d13bc225118ce38927c426815a5beb12
|
3 |
size 267832560
|
nest-cli.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"$schema": "https://json.schemastore.org/nest-cli",
|
3 |
+
"collection": "@nestjs/schematics",
|
4 |
+
"sourceRoot": "src",
|
5 |
+
"compilerOptions": {
|
6 |
+
"deleteOutDir": true
|
7 |
+
}
|
8 |
+
}
|
package-lock.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
package.json
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "test",
|
3 |
+
"version": "0.0.1",
|
4 |
+
"description": "",
|
5 |
+
"author": "",
|
6 |
+
"private": true,
|
7 |
+
"license": "UNLICENSED",
|
8 |
+
"scripts": {
|
9 |
+
"build": "nest build",
|
10 |
+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
11 |
+
"start": "nest start",
|
12 |
+
"start:dev": "nest start --watch",
|
13 |
+
"start:debug": "nest start --debug --watch",
|
14 |
+
"start:prod": "node dist/main",
|
15 |
+
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
16 |
+
"test": "jest",
|
17 |
+
"test:watch": "jest --watch",
|
18 |
+
"test:cov": "jest --coverage",
|
19 |
+
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
20 |
+
"test:e2e": "jest --config ./test/jest-e2e.json"
|
21 |
+
},
|
22 |
+
"dependencies": {
|
23 |
+
"@nestjs/common": "^10.0.0",
|
24 |
+
"@nestjs/core": "^10.0.0",
|
25 |
+
"@nestjs/platform-express": "^10.0.0",
|
26 |
+
"reflect-metadata": "^0.2.0",
|
27 |
+
"rxjs": "^7.8.1"
|
28 |
+
},
|
29 |
+
"devDependencies": {
|
30 |
+
"@nestjs/cli": "^10.0.0",
|
31 |
+
"@nestjs/schematics": "^10.0.0",
|
32 |
+
"@nestjs/testing": "^10.0.0",
|
33 |
+
"@types/express": "^4.17.17",
|
34 |
+
"@types/jest": "^29.5.2",
|
35 |
+
"@types/node": "^20.3.1",
|
36 |
+
"@types/supertest": "^6.0.0",
|
37 |
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
38 |
+
"@typescript-eslint/parser": "^8.0.0",
|
39 |
+
"eslint": "^8.42.0",
|
40 |
+
"eslint-config-prettier": "^9.0.0",
|
41 |
+
"eslint-plugin-prettier": "^5.0.0",
|
42 |
+
"jest": "^29.5.0",
|
43 |
+
"prettier": "^3.0.0",
|
44 |
+
"source-map-support": "^0.5.21",
|
45 |
+
"supertest": "^7.0.0",
|
46 |
+
"ts-jest": "^29.1.0",
|
47 |
+
"ts-loader": "^9.4.3",
|
48 |
+
"ts-node": "^10.9.1",
|
49 |
+
"tsconfig-paths": "^4.2.0",
|
50 |
+
"typescript": "^5.1.3"
|
51 |
+
},
|
52 |
+
"jest": {
|
53 |
+
"moduleFileExtensions": [
|
54 |
+
"js",
|
55 |
+
"json",
|
56 |
+
"ts"
|
57 |
+
],
|
58 |
+
"rootDir": "src",
|
59 |
+
"testRegex": ".*\\.spec\\.ts$",
|
60 |
+
"transform": {
|
61 |
+
"^.+\\.(t|j)s$": "ts-jest"
|
62 |
+
},
|
63 |
+
"collectCoverageFrom": [
|
64 |
+
"**/*.(t|j)s"
|
65 |
+
],
|
66 |
+
"coverageDirectory": "../coverage",
|
67 |
+
"testEnvironment": "node"
|
68 |
+
}
|
69 |
+
}
|
special_tokens_map.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
{
|
2 |
-
"cls_token": "[CLS]",
|
3 |
-
"mask_token": "[MASK]",
|
4 |
-
"pad_token": "[PAD]",
|
5 |
-
"sep_token": "[SEP]",
|
6 |
-
"unk_token": "[UNK]"
|
7 |
-
}
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
src/app.controller.spec.ts
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Test, TestingModule } from '@nestjs/testing';
|
2 |
+
import { AppController } from './app.controller';
|
3 |
+
import { AppService } from './app.service';
|
4 |
+
|
5 |
+
describe('AppController', () => {
|
6 |
+
let appController: AppController;
|
7 |
+
|
8 |
+
beforeEach(async () => {
|
9 |
+
const app: TestingModule = await Test.createTestingModule({
|
10 |
+
controllers: [AppController],
|
11 |
+
providers: [AppService],
|
12 |
+
}).compile();
|
13 |
+
|
14 |
+
appController = app.get<AppController>(AppController);
|
15 |
+
});
|
16 |
+
|
17 |
+
describe('root', () => {
|
18 |
+
it('should return "Hello World!"', () => {
|
19 |
+
expect(appController.getHello()).toBe('Hello World!');
|
20 |
+
});
|
21 |
+
});
|
22 |
+
});
|
src/app.controller.ts
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Controller, Get } from '@nestjs/common';
|
2 |
+
import { AppService } from './app.service';
|
3 |
+
|
4 |
+
@Controller()
|
5 |
+
export class AppController {
|
6 |
+
constructor(private readonly appService: AppService) {}
|
7 |
+
|
8 |
+
@Get()
|
9 |
+
|
10 |
+
getHello(): string {
|
11 |
+
return this.appService.getHello();
|
12 |
+
}
|
13 |
+
}
|
src/app.module.ts
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Module } from '@nestjs/common';
|
2 |
+
import { AppController } from './app.controller';
|
3 |
+
import { AppService } from './app.service';
|
4 |
+
|
5 |
+
@Module({
|
6 |
+
imports: [],
|
7 |
+
controllers: [AppController],
|
8 |
+
providers: [AppService],
|
9 |
+
})
|
10 |
+
export class AppModule {}
|
src/app.service.ts
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Injectable } from '@nestjs/common';
|
2 |
+
|
3 |
+
@Injectable()
|
4 |
+
export class AppService {
|
5 |
+
getHello(): string {
|
6 |
+
return 'Hello World!';
|
7 |
+
}
|
8 |
+
}
|
src/main.ts
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { NestFactory } from '@nestjs/core';
|
2 |
+
import { AppModule } from './app.module';
|
3 |
+
|
4 |
+
|
5 |
+
async function bootstrap() {
|
6 |
+
const app = await NestFactory.create(AppModule);
|
7 |
+
await app.listen(3000);
|
8 |
+
}
|
9 |
+
bootstrap();
|
test/app.e2e-spec.ts
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Test, TestingModule } from '@nestjs/testing';
|
2 |
+
import { INestApplication } from '@nestjs/common';
|
3 |
+
import * as request from 'supertest';
|
4 |
+
import { AppModule } from './../src/app.module';
|
5 |
+
|
6 |
+
describe('AppController (e2e)', () => {
|
7 |
+
let app: INestApplication;
|
8 |
+
|
9 |
+
beforeEach(async () => {
|
10 |
+
const moduleFixture: TestingModule = await Test.createTestingModule({
|
11 |
+
imports: [AppModule],
|
12 |
+
}).compile();
|
13 |
+
|
14 |
+
app = moduleFixture.createNestApplication();
|
15 |
+
await app.init();
|
16 |
+
});
|
17 |
+
|
18 |
+
it('/ (GET)', () => {
|
19 |
+
return request(app.getHttpServer())
|
20 |
+
.get('/')
|
21 |
+
.expect(200)
|
22 |
+
.expect('Hello World!');
|
23 |
+
});
|
24 |
+
});
|
test/jest-e2e.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"moduleFileExtensions": ["js", "json", "ts"],
|
3 |
+
"rootDir": ".",
|
4 |
+
"testEnvironment": "node",
|
5 |
+
"testRegex": ".e2e-spec.ts$",
|
6 |
+
"transform": {
|
7 |
+
"^.+\\.(t|j)s$": "ts-jest"
|
8 |
+
}
|
9 |
+
}
|
tokenizer_config.json
CHANGED
@@ -1,55 +1,55 @@
|
|
1 |
-
{
|
2 |
-
"added_tokens_decoder": {
|
3 |
-
"0": {
|
4 |
-
"content": "[PAD]",
|
5 |
-
"lstrip": false,
|
6 |
-
"normalized": false,
|
7 |
-
"rstrip": false,
|
8 |
-
"single_word": false,
|
9 |
-
"special": true
|
10 |
-
},
|
11 |
-
"100": {
|
12 |
-
"content": "[UNK]",
|
13 |
-
"lstrip": false,
|
14 |
-
"normalized": false,
|
15 |
-
"rstrip": false,
|
16 |
-
"single_word": false,
|
17 |
-
"special": true
|
18 |
-
},
|
19 |
-
"101": {
|
20 |
-
"content": "[CLS]",
|
21 |
-
"lstrip": false,
|
22 |
-
"normalized": false,
|
23 |
-
"rstrip": false,
|
24 |
-
"single_word": false,
|
25 |
-
"special": true
|
26 |
-
},
|
27 |
-
"102": {
|
28 |
-
"content": "[SEP]",
|
29 |
-
"lstrip": false,
|
30 |
-
"normalized": false,
|
31 |
-
"rstrip": false,
|
32 |
-
"single_word": false,
|
33 |
-
"special": true
|
34 |
-
},
|
35 |
-
"103": {
|
36 |
-
"content": "[MASK]",
|
37 |
-
"lstrip": false,
|
38 |
-
"normalized": false,
|
39 |
-
"rstrip": false,
|
40 |
-
"single_word": false,
|
41 |
-
"special": true
|
42 |
-
}
|
43 |
-
},
|
44 |
-
"clean_up_tokenization_spaces": true,
|
45 |
-
"cls_token": "[CLS]",
|
46 |
-
"do_lower_case": true,
|
47 |
-
"mask_token": "[MASK]",
|
48 |
-
"model_max_length": 512,
|
49 |
-
"pad_token": "[PAD]",
|
50 |
-
"sep_token": "[SEP]",
|
51 |
-
"strip_accents": null,
|
52 |
-
"tokenize_chinese_chars": true,
|
53 |
-
"tokenizer_class": "DistilBertTokenizer",
|
54 |
-
"unk_token": "[UNK]"
|
55 |
-
}
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": true,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"model_max_length": 512,
|
49 |
+
"pad_token": "[PAD]",
|
50 |
+
"sep_token": "[SEP]",
|
51 |
+
"strip_accents": null,
|
52 |
+
"tokenize_chinese_chars": true,
|
53 |
+
"tokenizer_class": "DistilBertTokenizer",
|
54 |
+
"unk_token": "[UNK]"
|
55 |
+
}
|
training_args.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 5176
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2e72ea60301d6bde3f92910297fce6b7aea7446c9bb086e5c91b6dd232120956
|
3 |
size 5176
|
tsconfig.build.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"extends": "./tsconfig.json",
|
3 |
+
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
|
4 |
+
}
|
tsconfig.json
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"compilerOptions": {
|
3 |
+
"module": "commonjs",
|
4 |
+
"declaration": true,
|
5 |
+
"removeComments": true,
|
6 |
+
"emitDecoratorMetadata": true,
|
7 |
+
"experimentalDecorators": true,
|
8 |
+
"allowSyntheticDefaultImports": true,
|
9 |
+
"target": "ES2021",
|
10 |
+
"sourceMap": true,
|
11 |
+
"outDir": "./dist",
|
12 |
+
"baseUrl": "./",
|
13 |
+
"incremental": true,
|
14 |
+
"skipLibCheck": true,
|
15 |
+
"strictNullChecks": false,
|
16 |
+
"noImplicitAny": false,
|
17 |
+
"strictBindCallApply": false,
|
18 |
+
"forceConsistentCasingInFileNames": false,
|
19 |
+
"noFallthroughCasesInSwitch": false
|
20 |
+
}
|
21 |
+
}
|