Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e1e210d
Broken state
kevjumba Aug 5, 2022
011d1e0
working state
kevjumba Aug 10, 2022
a6a2fce
Fix the lint issues
kevjumba Aug 10, 2022
57b63bb
Semi working state
kevjumba Aug 10, 2022
ae7ed8a
Fix
kevjumba Aug 10, 2022
421645b
Fremove print
kevjumba Aug 10, 2022
07fece5
Fix lint
kevjumba Aug 11, 2022
4062031
Run build-sphinx
kevjumba Aug 11, 2022
cb39329
Add tutorials
kevjumba Aug 11, 2022
554ca1a
Fix
kevjumba Aug 11, 2022
4a969e7
Fix?
kevjumba Aug 11, 2022
116320a
Fix lint
kevjumba Aug 11, 2022
c0b16ef
Fix
kevjumba Aug 11, 2022
44d09d0
Fix lint
kevjumba Aug 12, 2022
b6f0a79
Begin configuring tests
adchia Aug 15, 2022
2b2ff40
Fix
kevjumba Aug 15, 2022
4616366
Working version
kevjumba Aug 16, 2022
c7d9852
Fix
kevjumba Aug 17, 2022
d2e290b
Fix
kevjumba Aug 17, 2022
a726a9a
Fix
kevjumba Aug 17, 2022
32992e3
Fix lint
kevjumba Aug 17, 2022
ebb934b
Fix lint
kevjumba Aug 17, 2022
e456acb
Fix
kevjumba Aug 17, 2022
45f479f
Fix lint
kevjumba Aug 17, 2022
4b8c4a2
Fix
kevjumba Aug 17, 2022
b1bf602
Fix
kevjumba Aug 17, 2022
4586f00
Fix azure
kevjumba Aug 17, 2022
3b88c0b
Fix
kevjumba Aug 17, 2022
9ae8ee3
Fix
kevjumba Aug 17, 2022
1b12e4a
Fix lint and address issues
kevjumba Aug 18, 2022
0ca5048
Fix integration tests
kevjumba Aug 18, 2022
883f314
Fix
kevjumba Aug 18, 2022
ccf8716
Fix lint and address issues
kevjumba Aug 18, 2022
f05288e
Fix
kevjumba Aug 18, 2022
ee30e73
Fix
kevjumba Aug 18, 2022
ab17db9
Fix
kevjumba Aug 18, 2022
be162f5
Revert
kevjumba Aug 18, 2022
f5aa476
Fix
kevjumba Aug 18, 2022
4423dfa
Fix
kevjumba Aug 18, 2022
5806507
Fix
kevjumba Aug 18, 2022
7a4d055
Fix lint
kevjumba Aug 19, 2022
78b74b1
Fix
kevjumba Aug 19, 2022
a9e8119
Fix lint
kevjumba Aug 19, 2022
1341e3e
Fix pyarrow
kevjumba Aug 19, 2022
3d42093
Fix lint
kevjumba Aug 19, 2022
1c591f0
add requirements files
adchia Aug 19, 2022
b4da607
fix name of docs
adchia Aug 19, 2022
c3a0423
fix offline store readme
adchia Aug 19, 2022
576b57e
fix offline store readme
adchia Aug 19, 2022
69940ac
fix
adchia Aug 19, 2022
516ff76
fix
adchia Aug 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lint and address issues
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
  • Loading branch information
kevjumba committed Aug 19, 2022
commit 1b12e4a5858a33e0c2ee64f3b84c41fc61f64bb2
2 changes: 1 addition & 1 deletion docs/tutorials/azure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ In the Azure ML Studio, select *Notebooks* from the left-hand menu and then open
## 6. Running Feast Azure Tutorials locally without Azure workspace

* If you are on a free tier instance, you will not be able to deploy the azure deployment because the azure workspace requires VCPUs and the free trial subscription does not have a quota.
* The workaround is to remove the `Microsoft.MachineLearningServices/workspaces/computes` resource from `fs_snapse_azure_deploy.json` and setting up the environment locally.
* The workaround is to remove the `Microsoft.MachineLearningServices/workspaces/computes` resource from `fs_synapse_azure_deploy.json` and setting up the environment locally.
1. After deployment, find your `Azure SQL Pool` secrets by going to `Subscriptions-><Your Subscription>->Resource Group->Key Vault` and giving your account admin permissions to the keyvault. Retrieve the `FEAST-REGISTRY-PATH`, `FEAST-OFFLINE-STORE-CONN`, and `FEAST-ONLINE-STORE-CONN` secrets to use in your local environment.
2. In your local environment, you will need to install the azure cli and login to the cli using `az login`.
3. After everything is setup, you should be able to work through the first 2 tutorial notebooks without any errors (The 3rd notebook requires Azure workspace resources).
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ def get_historical_features(
entity_df[entity_df_event_timestamp_col], utc=True
).fillna(pandas.Timestamp.now())

# TODO: figure out how to deal with entity dataframes that are strings
elif isinstance(entity_df, str):
raise ValueError(
"string entities are currently not supported in the MsSQL offline store."
)
(
table_schema,
table_name,
Expand Down Expand Up @@ -370,9 +373,10 @@ def persist(self, storage: SavedDatasetStorage):
pyarrow.parquet.write_to_dataset(
self.to_arrow(), root_path=path, filesystem=filesystem
)

def supports_remote_storage_export(self) -> bool:
return False

def to_remote_storage(self) -> List[str]:
raise NotImplementedError()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .data_source import mssql_container # noqa
Comment thread
adchia marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import pandas as pd
import pytest
from sqlalchemy import create_engine
from testcontainers.core.container import DockerContainer
from testcontainers.core.waiting_utils import wait_for_logs
from testcontainers.mssql import SqlServerContainer

Expand All @@ -24,16 +23,10 @@
MSSQL_PASSWORD = "yourStrong(!)Password"


# This is the sql container to use if your machine doesn't support the official msql docker container.
@pytest.fixture(scope="session")
Comment thread
adchia marked this conversation as resolved.
def mssql_container():
container = (
DockerContainer("mcr.microsoft.com/azure-sql-edge:1.0.6")
.with_exposed_ports("1433")
.with_env("ACCEPT_EULA", "1")
.with_env("MSSQL_USER", MSSQL_USER)
.with_env("MSSQL_SA_PASSWORD", MSSQL_PASSWORD)
)
container = SqlServerContainer(user=MSSQL_USER, password=MSSQL_PASSWORD)
container.start()
container.start()
log_string_to_wait_for = "Service Broker manager has started"
wait_for_logs(container=container, predicate=log_string_to_wait_for, timeout=30)
Expand All @@ -50,8 +43,8 @@ def __init__(
):
super().__init__(project_name)
self.tables_created: List[str] = []
self.container = SqlServerContainer(user=MSSQL_USER, password=MSSQL_PASSWORD)
self.container.start()
self.container = fixture_request.getfixturevalue("mssql_container")

if not self.container:
raise RuntimeError(
"In order to use this data source "
Expand Down Expand Up @@ -109,4 +102,4 @@ def get_prefixed_table_name(self, destination_name: str) -> str:
return f"{self.project_name}_{destination_name}"

def teardown(self):
container.stop()
pass
Comment thread
adchia marked this conversation as resolved.
Outdated
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/offline_stores/offline_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def build_point_in_time_query(
"full_feature_names": full_feature_names,
"final_output_feature_names": final_output_feature_names,
}

query = template.render(template_context)
return query

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ class Environment:
python_feature_server: bool
worker_id: str
online_store_creator: Optional[OnlineStoreCreator] = None
fixture_request: Optional[pytest.FixtureRequest] = None

def __post_init__(self):
self.end_date = datetime.utcnow().replace(microsecond=0, second=0, minute=0)
Expand Down Expand Up @@ -457,6 +458,7 @@ def construct_test_environment(
python_feature_server=test_repo_config.python_feature_server,
worker_id=worker_id,
online_store_creator=online_creator,
fixture_request=fixture_request,
)

return environment
Expand Down
14 changes: 11 additions & 3 deletions sdk/python/tests/integration/registration/test_universal_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def test_universal_cli(environment: Environment):
try:
repo_path = Path(repo_dir_name)
feature_store_yaml = make_feature_store_yaml(
project, environment.test_repo_config, repo_path
project,
environment.test_repo_config,
repo_path,
fixture_request=environment.fixture_request,
)

repo_config = repo_path / "feature_store.yaml"
Expand Down Expand Up @@ -120,7 +123,10 @@ def test_odfv_apply(environment) -> None:
try:
repo_path = Path(repo_dir_name)
feature_store_yaml = make_feature_store_yaml(
project, environment.test_repo_config, repo_path
project,
environment.test_repo_config,
repo_path,
fixture_request=environment.fixture_request,
)

repo_config = repo_path / "feature_store.yaml"
Expand Down Expand Up @@ -151,7 +157,9 @@ def test_nullable_online_store(test_nullable_online_store) -> None:
try:
repo_path = Path(repo_dir_name)
feature_store_yaml = make_feature_store_yaml(
project, test_nullable_online_store, repo_path
project,
Comment thread
adchia marked this conversation as resolved.
Outdated
test_nullable_online_store,
repo_path,
)

repo_config = repo_path / "feature_store.yaml"
Expand Down
11 changes: 9 additions & 2 deletions sdk/python/tests/utils/e2e_test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,15 @@ def _check_offline_and_online_features(
)


def make_feature_store_yaml(project, test_repo_config, repo_dir_name: Path):
offline_creator: DataSourceCreator = test_repo_config.offline_store_creator(project)
def make_feature_store_yaml(
project,
test_repo_config,
repo_dir_name: Path,
fixture_request: Optional[pytest.FixtureRequest],
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't need to pass a fixture_request actually. the test environment already has a datasourcecreator

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

):
offline_creator: DataSourceCreator = test_repo_config.offline_store_creator(
project, fixture_request=fixture_request
)

offline_store_config = offline_creator.create_offline_store_config()
online_store = test_repo_config.online_store
Expand Down