Skip to content

Commit 18bad3e

Browse files
committed
updated readme
1 parent b4289c1 commit 18bad3e

File tree

3 files changed

+64
-4
lines changed

3 files changed

+64
-4
lines changed

.github/workflows/classification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: classification
33
on:
44
pull_request:
55
branches:
6-
- main
6+
- master # this can be main
77
paths:
88
- "classification/**"
99

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,37 @@
1-
# serverless-transformers-on-aws
2-
Deploy transformers serverless on AWS Lambda
1+
# End2End Serverless Transformers On AWS Lambda for NLP 🚀
2+
3+
Deploy transformers serverless on AWS Lambda with ease 💆‍♂️
4+
5+
Current available pipelines
6+
1. classification
7+
1. translation (coming soon)
8+
1. token classification (need contribution)
9+
1. text generation (need contribution)
10+
1. zero shot classification (need contribution)
11+
12+
## What you get with this?
13+
- ability to run transformers without servers
14+
- complete CI/CD
15+
- concurrency upto 1000 (default AWS limit)
16+
## How to use this?
17+
- clone the repo
18+
- keep the pipeline folder you want to use
19+
- modify the source and tests
20+
- keep the corresponding github action in `.github/workflows`
21+
- modify directory, registry and lambda function name in workflow
22+
- create repository in AWS ECR
23+
- set up secrets in repo (needed for access to AWS; this creds should have access to ECR and Lambda)
24+
- AWS_ACCESS_KEY_ID
25+
- AWS_SECRET_ACCESS_KEY
26+
- push the code
27+
- create PR
28+
- this will build the container
29+
- run all the tests
30+
- push container to ECR registry
31+
- update lambda with the new container (this will not happen when you push the first time)
32+
- create lambda function if it does not exist
33+
- give appropriate IAM role
34+
- set timeout and RAM
35+
- create API in API gateway and link to lambda
36+
37+
Done! Now you can call the lambda using the API

classification/README.MD

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
11
## Classification service
2-
Classification using AWS Lambda & Transformers
2+
Classification using Transformers on AWS Lambda. Check root readme for complete setup info.
3+
4+
## Request format
5+
```
6+
{
7+
"texts": ["food was great", "food was bad", "i am going out for food"],
8+
"model_name": "cardiffnlp/twitter-roberta-base-sentiment",
9+
"tokenizer_name": "roberta-base"
10+
}
11+
```
12+
13+
## Response format
14+
```
15+
{
16+
'predictions': [{
17+
'label': 'POSITIVE',
18+
'score': 0.97
19+
}, {
20+
'label': 'NEGATIVE',
21+
'score': 0.95
22+
}, {
23+
'label': 'NEUTRAL',
24+
'score': 0.69
25+
}]
26+
}
27+
```

0 commit comments

Comments
 (0)