Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 committed Sep 15, 2021
1 parent 2bccdeb commit 0ee173b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def create_global_stats_feature_view(source, infer_features: bool = False):


def create_order_feature_view(source, infer_features: bool = False):
order_feature_view = FeatureView(
return FeatureView(
name="order",
entities=["driver", "customer_id"],
features=None
Expand All @@ -129,4 +129,3 @@ def create_order_feature_view(source, infer_features: bool = False):
batch_source=source,
ttl=timedelta(days=2),
)
return order_feature_view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from datetime import datetime
from typing import Any, Dict, List
from typing import Any, Dict, List, Optional

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -37,9 +37,11 @@ def find_asof_record(
ts_key: str,
ts_start: datetime,
ts_end: datetime,
filter_keys: List[str] = [],
filter_values: List[Any] = [],
filter_keys: Optional[List[str]] = None,
filter_values: Optional[List[Any]] = None,
) -> Dict[str, Any]:
filter_keys = filter_keys or []
filter_values = filter_values or []
assert len(filter_keys) == len(filter_values)
found_record = {}
for record in records:
Expand Down

0 comments on commit 0ee173b

Please sign in to comment.