Update ts_generation_mixin.py
Browse files- ts_generation_mixin.py +8 -0
ts_generation_mixin.py
CHANGED
@@ -1,3 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
class TSGenerationMixin(GenerationMixin):
|
2 |
|
3 |
def _greedy_search(
|
|
|
1 |
+
import warnings
|
2 |
+
from typing import Any, Dict, List, Optional, Union, Callable
|
3 |
+
import torch
|
4 |
+
from transformers import GenerationMixin, LogitsProcessorList, StoppingCriteriaList
|
5 |
+
from transformers.generation import validate_stopping_criteria, EosTokenCriteria
|
6 |
+
from transformers.generation.utils import GenerateNonBeamOutput, GenerateEncoderDecoderOutput, GenerateDecoderOnlyOutput, GenerationConfig, GenerateOutput
|
7 |
+
from transformers.utils import ModelOutput
|
8 |
+
|
9 |
class TSGenerationMixin(GenerationMixin):
|
10 |
|
11 |
def _greedy_search(
|