generated from ashleve/lightning-hydra-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload_models.py
31 lines (26 loc) · 1.13 KB
/
upload_models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
import shutil
from bin.transformers.download_huggingface_model import download_huggingface_model
from bin.checkpoints.upload_to_kaggle import (
kaggle_get_metadata,
kaggle_new_dataset_version,
)
kaggle_dataset = "pretrainedmodels"
folder = "./models/"
pt_path = "models/pt"
if os.path.exists(pt_path):
shutil.rmtree(pt_path, ignore_errors=False)
os.makedirs(pt_path)
download_huggingface_model(pt_path, "roberta-base")
download_huggingface_model(pt_path, "microsoft/deberta-v3-base")
download_huggingface_model(pt_path, "unitary/unbiased-toxic-roberta")
download_huggingface_model(pt_path, "vinai/bertweet-base")
download_huggingface_model(pt_path, "unitary/toxic-bert")
download_huggingface_model(pt_path, "google/electra-base-discriminator")
download_huggingface_model(pt_path, "xlnet-base-cased")
download_huggingface_model(pt_path, "microsoft/deberta-v3-large")
download_huggingface_model(pt_path, "roberta-large")
download_huggingface_model(pt_path, "google/electra-large-discriminator")
download_huggingface_model(pt_path, "xlnet-large-cased")
kaggle_get_metadata(pt_path, kaggle_dataset)
kaggle_new_dataset_version(pt_path)