Skip to content

Commit 347b742

Browse files
chg: Updated README.
1 parent f86d98f commit 347b742

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Then ensures that the kvrocks database of Vulnerability-Lookup is running.
4545
Creation of datasets:
4646

4747
```bash
48-
$ vulntrain-create-dataset --nb-rows 10000 --upload --repo-id CIRCL/vulnerability-dataset-10k
48+
$ vulntrain-dataset-generation --sources cvelistv5 --nb-rows 10000 --upload --repo-id CIRCL/vulnerability-dataset-10k
4949
Generating train split: 9999 examples [00:00, 177710.74 examples/s]
5050
DatasetDict({
5151
train: Dataset({
@@ -73,7 +73,7 @@ For now we are using distilbert-base-uncased (AutoModelForMaskedLM) or gpt2 (Aut
7373
The goal is to generate text.
7474

7575
```bash
76-
$ vulntrain-train-dataset --base-model gpt2 --model-name CIRCL/vulnerability
76+
$ vulntrain-train-description-generation --base-model gpt2 --dataset-id CIRCL/vulnerability --repo-id CIRCL/vulnerability-description-generation-gpt2
7777
Using CUDA (Nvidia GPU).
7878
[codecarbon WARNING @ 13:28:13] Multiple instances of codecarbon are allowed to run at the same time.
7979
[codecarbon INFO @ 13:28:13] [setup] RAM Tracking...

vulntrain/datasets/create_dataset.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,11 @@ def main():
151151
print(dataset_dict)
152152

153153
if args.upload:
154-
# dataset_dict.push_to_hub(args.repo_id, commit_message=args.commit_message, token=hf_token)
155-
dataset_dict.push_to_hub(args.repo_id)
154+
if args.commit_message:
155+
# dataset_dict.push_to_hub(args.repo_id, commit_message=args.commit_message, token=hf_token)
156+
dataset_dict.push_to_hub(args.repo_id, commit_message=args.commit_message)
157+
else:
158+
dataset_dict.push_to_hub(args.repo_id)
156159

157160

158161
if __name__ == "__main__":

vulntrain/trainers/classify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def main():
183183
parser.add_argument(
184184
"--model-save-dir",
185185
dest="model_save_dir",
186-
required=True,
186+
default="results",
187187
help="The path to a directory where the tokenizer and the model will be saved.",
188188
)
189189

vulntrain/trainers/summarize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def main():
130130
parser.add_argument(
131131
"--model-save-dir",
132132
dest="model_save_dir",
133-
required=True,
133+
default="results",
134134
help="The path to a directory where the tokenizer and the model will be saved.",
135135
)
136136

0 commit comments

Comments
 (0)