mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
decoding
This commit is contained in:
parent
2ac79cd3f3
commit
83d644c899
@ -15,11 +15,6 @@ class OpenAIIndexDSJsonl(torch.utils.data.Dataset): # torch.utils.data.Dataset
|
|||||||
|
|
||||||
def __init__(self, path: str, **kwargs):
|
def __init__(self, path: str, **kwargs):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.max_source_length = kwargs.get("max_source_length", 2048)
|
|
||||||
self.min_source_length = kwargs.get("min_source_length", 0)
|
|
||||||
self.max_target_length = kwargs.get("max_target_length", 2048)
|
|
||||||
self.min_target_length = kwargs.get("min_target_length", 0)
|
|
||||||
self.max_token_length = kwargs.get("max_token_length", 2200)
|
|
||||||
|
|
||||||
is_training = kwargs.get("is_training", True)
|
is_training = kwargs.get("is_training", True)
|
||||||
if not (path.endswith(".jsonl") or path.endswith(".json")):
|
if not (path.endswith(".jsonl") or path.endswith(".json")):
|
||||||
|
|||||||
@ -287,7 +287,9 @@ class Trainer:
|
|||||||
elif self.use_fsdp:
|
elif self.use_fsdp:
|
||||||
pass
|
pass
|
||||||
elif self.rank == 0:
|
elif self.rank == 0:
|
||||||
logging.info(f"Save checkpoint: {epoch}, rank: {self.local_rank}\n")
|
logging.info(
|
||||||
|
f"Save checkpoint: {epoch}, rank: {self.rank}, local_rank: {self.local_rank}\n"
|
||||||
|
)
|
||||||
# self.step_or_epoch += 1
|
# self.step_or_epoch += 1
|
||||||
state = {
|
state = {
|
||||||
"epoch": epoch,
|
"epoch": epoch,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user