Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Peter
commited on
Commit
•
596d396
1
Parent(s):
0de962e
add logs
Browse files- summarize.py +4 -1
summarize.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import torch
|
2 |
from tqdm.auto import tqdm
|
3 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
@@ -88,7 +90,8 @@ def summarize_via_tokenbatches(
|
|
88 |
Returns:
|
89 |
str: the summary
|
90 |
"""
|
91 |
-
|
|
|
92 |
encoded_input = tokenizer(
|
93 |
input_text,
|
94 |
padding="max_length",
|
|
|
1 |
+
import logging
|
2 |
+
|
3 |
import torch
|
4 |
from tqdm.auto import tqdm
|
5 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
|
|
90 |
Returns:
|
91 |
str: the summary
|
92 |
"""
|
93 |
+
# log all input parameters
|
94 |
+
logging.info(f"input parameters: {kwargs}, batch_length={batch_length}, batch_stride={batch_stride}")
|
95 |
encoded_input = tokenizer(
|
96 |
input_text,
|
97 |
padding="max_length",
|