https://github.com/unit8co/few-labels-webinar
Demo for learning with few labels webinar
https://github.com/unit8co/few-labels-webinar
Last synced: 9 months ago
JSON representation
Demo for learning with few labels webinar
- Host: GitHub
- URL: https://github.com/unit8co/few-labels-webinar
- Owner: unit8co
- Created: 2021-06-22T07:59:39.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-07T18:08:02.000Z (almost 5 years ago)
- Last Synced: 2025-04-09T07:32:41.488Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 7
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Demo: learning with few labeled data and many unlabeled
Demo for learning with few labels webinar.
The idea is inspired from (but not the same)
[Graph Agreement Models](https://proceedings.neurips.cc/paper/2019/file/4772c1b987f1f6d8c9d4ef0f3b764f7a-Paper.pdf).
# How to run this
Get elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html
Run elasticsearch in a separate terminal. If you have mem issues run it like (for example with 1G mem):
```
ES_JAVA_OPTS="-Xms1g -Xmx1g" ./bin/elasticsearch
```
Install requirements:
```
python3.8 -m venv venv
source venv/bin/activate
pip install -r requirements
```
To train MLM:
```
python -m src.train_agree_add_loop --only_mlm 1
```
To train on top default base model:
```
python -m src.train_agree_add_loop
```
To train on top of your trained MLM:
```
python -m src.train_agree_add_loop --base_model_name models/nlu_evaluation_data/mlm/epoch_SOMENUMBER
```
To run with fasttext as classifier for computing the baseline:
```
python -m src.train_agree_add_loop --use_fasttext 1
```
# Info
Formatted with black!
```
pip install black
black -l 80 -t py38 src/*
```
Contributions from:
* Mostafa Ajallooeian, mostafa.ajallooeian@unit8.co
License: have fun and share!