Upload feature_extraction_moment.py
Browse files
feature_extraction_moment.py
CHANGED
@@ -23,7 +23,7 @@ class MomentFeatureExtractor(FeatureExtractionMixin):
|
|
23 |
# TODO: 本来はMoment側のTokenizerもts_tokenizerとして入れたかったが、モデルに組み込まれてしまっている。
|
24 |
# refers: https://github.com/moment-timeseries-foundation-model/moment/blob/088b253a1138ac7e48a7efc9bf902336c9eec8d9/momentfm/models/moment.py#L105
|
25 |
|
26 |
-
model_input_names = ["time_series_values", "
|
27 |
|
28 |
def __init__(self, **kwargs):
|
29 |
super().__init__(**kwargs)
|
@@ -50,7 +50,7 @@ class MomentFeatureExtractor(FeatureExtractionMixin):
|
|
50 |
time_series_values = None
|
51 |
input_mask = None
|
52 |
|
53 |
-
return BatchFeature(data={"time_series_values": time_series_values, "
|
54 |
|
55 |
|
56 |
def _convert_time_series(self, time_series, return_tensors, torch_dtype, padding, max_length):
|
|
|
23 |
# TODO: 本来はMoment側のTokenizerもts_tokenizerとして入れたかったが、モデルに組み込まれてしまっている。
|
24 |
# refers: https://github.com/moment-timeseries-foundation-model/moment/blob/088b253a1138ac7e48a7efc9bf902336c9eec8d9/momentfm/models/moment.py#L105
|
25 |
|
26 |
+
model_input_names = ["time_series_values", "time_series_input_mask"]
|
27 |
|
28 |
def __init__(self, **kwargs):
|
29 |
super().__init__(**kwargs)
|
|
|
50 |
time_series_values = None
|
51 |
input_mask = None
|
52 |
|
53 |
+
return BatchFeature(data={"time_series_values": time_series_values, "time_series_input_mask": input_mask})
|
54 |
|
55 |
|
56 |
def _convert_time_series(self, time_series, return_tensors, torch_dtype, padding, max_length):
|