Skip to content

Commit e56d2c2

Browse files
committed
format
Signed-off-by: pyalex <moskalenko.alexey@gmail.com>
1 parent db93633 commit e56d2c2

4 files changed

Lines changed: 26 additions & 27 deletions

File tree

‎protos/feast/core/SavedDataset.proto‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
//
2+
// Copyright 2021 The Feast Authors
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// https://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
118
syntax = "proto3";
219

320
package feast.core;

‎sdk/python/feast/feature_store.py‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -787,10 +787,11 @@ def get_historical_features(
787787
_feature_refs = [ref for ref in _feature_refs if ref not in request_fv_refs]
788788
provider = self._get_provider()
789789

790-
if save_as:
791-
save_as = SavedDataset(
792-
name=save_as.name, features=[], storage=save_as.storage
793-
)
790+
saved_dataset = (
791+
SavedDataset(name=save_as.name, features=[], storage=save_as.storage)
792+
if save_as
793+
else None
794+
)
794795

795796
job = provider.get_historical_features(
796797
self.config,
@@ -800,7 +801,7 @@ def get_historical_features(
800801
self._registry,
801802
self.project,
802803
full_feature_names,
803-
save_as=save_as,
804+
save_as=saved_dataset,
804805
)
805806

806807
return job

‎sdk/python/feast/infra/offline_stores/offline_store.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
from abc import ABC, abstractmethod
1515
from datetime import datetime
16-
from typing import List, Optional, Type, Union
16+
from typing import List, Optional, Union
1717

1818
import pandas as pd
1919
import pyarrow

‎sdk/python/feast/saved_dataset.py‎

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from abc import abstractmethod
22
from datetime import datetime
3-
from typing import Dict, List, Optional, Type, Union
3+
from typing import Dict, List, Optional, Type
44

55
from google.protobuf.json_format import MessageToJson
66

@@ -23,7 +23,7 @@ def __new__(cls, name, bases, dct):
2323

2424

2525
class SavedDatasetStorage(metaclass=_StorageRegistry):
26-
_proto_attr_name = None
26+
_proto_attr_name: str
2727

2828
@staticmethod
2929
def from_proto(storage_proto: SavedDatasetStorageProto) -> "SavedDatasetStorage":
@@ -37,25 +37,6 @@ def to_proto(self) -> SavedDatasetStorageProto:
3737
pass
3838

3939

40-
# class FileStorage(SavedDatasetStorage):
41-
# path: str
42-
# file_format: FileFormat
43-
# s3_endpoint_override: Optional[str]
44-
#
45-
# def __init__(
46-
# self,
47-
# path: str = None,
48-
# file_format: FileFormat = None,
49-
# s3_endpoint_override: Optional[str] = None,
50-
# ):
51-
# self.path = path
52-
# self.file_format = file_format
53-
# self.s3_endpoint_override = s3_endpoint_override
54-
#
55-
# def to_proto_options(self):
56-
# return {"file_options": FileOptions}
57-
58-
5940
class SavedDataset:
6041
name: str
6142
features: List[FeatureViewProjection]

0 commit comments

Comments
 (0)