Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Feature Tables API to Core & Python SDK #1019

Merged
merged 53 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
881440e
Reorganise existing protos in CoreService by type.
mrzzy Sep 23, 2020
74e64b2
Add new FeatureTables API to Core Protobuf definitions
mrzzy Sep 23, 2020
5054148
Fix name collision in proto java outer classname with message name
mrzzy Sep 23, 2020
a31dc58
Add missing max age field to Feature Table proto.
mrzzy Sep 24, 2020
5bbb9c6
Add Flyway DB migration to add Feature Table API.
mrzzy Sep 24, 2020
38fba08
Rename options field to options_json and change type to text.
mrzzy Sep 24, 2020
943b698
FeatureTable: Rename entity_names to entities
mrzzy Sep 24, 2020
a831c2f
Revert Reorganise existing protos in CoreService by type as it make i…
mrzzy Sep 24, 2020
1a28c97
Add FeatureSource entity for native representation of FeatureSource p…
mrzzy Sep 24, 2020
3332d12
Add missing nullable annotation on FeatureSource entity.
mrzzy Sep 24, 2020
ed7fe47
Update ListFeatureTablesRequest's Filter to follow naming convention.
mrzzy Sep 25, 2020
5ef589d
Add missing serialization code for FeatureSource's field mapping.
mrzzy Sep 25, 2020
ca124de
Split Feature proto from FeatureTable proto.
mrzzy Sep 25, 2020
6b044be
Update FeatureTable entity_names field to entities
mrzzy Sep 25, 2020
8199d36
Revert putting project in feature table spec
mrzzy Sep 25, 2020
786169f
Update ListFeatureTable Proto to return full FeatureTable objects and…
mrzzy Sep 25, 2020
3e63061
Fix typo in CoreService proto
mrzzy Sep 25, 2020
770f62a
Add FeatureV2 core model to store FeatureSpecV2
mrzzy Sep 25, 2020
7b5caa2
Add FeatureTable core model to store FeatureTable protos
mrzzy Sep 25, 2020
a7e3c72
Fix naming grammar in CoreService proto
mrzzy Sep 25, 2020
85e08de
Standardise naming of specifying projects in CoreService proto
mrzzy Sep 25, 2020
5f1310c
Rename FeatureSource proto to FeatureSourceSpec for compatiblity.
mrzzy Sep 26, 2020
1339301
Update FeatureSource model to store type specific options as seperate…
mrzzy Sep 26, 2020
3f1b381
Add FeatureTableTest unit test to test FeatureTable core model
mrzzy Sep 27, 2020
4a406dc
Add FeatureTableValidator to validate FeatureTableSpec protobufs
mrzzy Sep 27, 2020
34325b9
Add listFeatureTables(), applyFeatureTable() & getFeatureTable() to C…
mrzzy Sep 27, 2020
ab8bc5c
Add FeatureTableRepository to save & retrieve FeatureTables in database.
mrzzy Sep 28, 2020
3ea9926
Fix hibernate errors on Feast Core boot.
mrzzy Sep 28, 2020
59f240a
Implement listFeatureTables() , applyFeatureTable(), and getFeatureTa…
mrzzy Sep 28, 2020
a847b95
Add applyFeatureSet integration tests SpecServiceIT
mrzzy Sep 28, 2020
3d9d8a8
Various fixes for creating FeatureTabes with applyFeatureTable
mrzzy Sep 28, 2020
b954988
Fixed bug with updating FeatureTable
mrzzy Sep 28, 2020
cb689b4
Update ListFeatureTables
terryyylim Sep 28, 2020
3fe5cda
Add Python SDK
terryyylim Sep 28, 2020
3052b96
Update GetFeatureTable
terryyylim Sep 29, 2020
23284b2
Remove unused proto imports and generate go protos
mrzzy Sep 29, 2020
6c84e2b
Fix ListFeatureTables IT
terryyylim Sep 29, 2020
1c4c096
Update comment to generalize FeatureSource's field mapping to all fie…
mrzzy Sep 29, 2020
841a3da
Fix feature table validator condition
terryyylim Sep 29, 2020
19460b3
Fix feature table unit tests
terryyylim Sep 29, 2020
cddee62
Update feature source proto
terryyylim Sep 29, 2020
c24137f
Address PR comments
terryyylim Sep 29, 2020
8b6fac2
Replace test with IT
terryyylim Sep 29, 2020
9be19e9
Update IT config
terryyylim Sep 29, 2020
d4e1d5b
Fix removal of entity check
terryyylim Sep 29, 2020
d6b3366
Fix test sort issue
terryyylim Sep 29, 2020
d67cb43
Store source options as json
terryyylim Sep 30, 2020
34dcf15
Update go protos
terryyylim Sep 30, 2020
f2aedfe
Remove go FeatureSource proto
terryyylim Sep 30, 2020
234a97d
Increase IT max pool size
terryyylim Oct 1, 2020
1b30b3b
Reduce pool size instead
terryyylim Oct 1, 2020
906306f
Replace mutablemapping with dict
terryyylim Oct 2, 2020
b19a4fe
Standardize use of timestamp_column instead of ts_column
terryyylim Oct 2, 2020
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
Replace test with IT
Signed-off-by: Terence <terencelimxp@gmail.com>
  • Loading branch information
terryyylim committed Oct 2, 2020
commit 8b6fac2969fad78cda978e5e3c0eaac77df73cd6
139 changes: 0 additions & 139 deletions core/src/test/java/feast/core/model/FeatureTableTest.java

This file was deleted.

65 changes: 65 additions & 0 deletions core/src/test/java/feast/core/service/SpecServiceIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import io.grpc.ManagedChannelBuilder;
import io.grpc.StatusRuntimeException;
import java.util.*;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Triple;
import org.junit.jupiter.api.BeforeAll;
Expand Down Expand Up @@ -1116,6 +1117,70 @@ public void shouldNotUpdateIfNoChanges() {
assertThat(updatedTable.getMeta().getRevision(), equalTo(table.getMeta().getRevision()));
}

@Test
public void shouldErrorIfEntityChangeOnUpdate() {
List<String> entities = Arrays.asList("entity1", "entity2");
FeatureTableProto.FeatureTableSpec spec =
DataGenerator.createFeatureTableSpec(
"featuretable1",
Arrays.asList("entity1"),
new HashMap<>() {
{
put("feature1", ValueProto.ValueType.Enum.STRING);
put("feature2", ValueProto.ValueType.Enum.FLOAT);
}
},
7200,
ImmutableMap.of("feat_key2", "feat_value2"))
.toBuilder()
.setBatchSource(
DataGenerator.createFileFeatureSourceSpec("file:///path/to/file", "ts_col", ""))
.build();

StatusRuntimeException exc =
assertThrows(
StatusRuntimeException.class, () -> apiClient.applyFeatureTable("default", spec));

assertThat(
exc.getMessage(),
equalTo(
String.format(
"INVALID_ARGUMENT: Updating the entities of a registered FeatureTable is not allowed: %s to %s",
entities.stream().collect(Collectors.toSet()),
spec.getEntitiesList().stream().collect(Collectors.toSet()))));
}

@Test
public void shouldErrorIfFeatureValueTypeChangeOnUpdate() {
FeatureTableProto.FeatureTableSpec spec =
DataGenerator.createFeatureTableSpec(
"featuretable1",
Arrays.asList("entity1", "entity2"),
new HashMap<>() {
{
put("feature1", ValueProto.ValueType.Enum.STRING);
put("feature2", ValueProto.ValueType.Enum.STRING_LIST);
}
},
7200,
ImmutableMap.of("feat_key2", "feat_value2"))
.toBuilder()
.setBatchSource(
DataGenerator.createFileFeatureSourceSpec("file:///path/to/file", "ts_col", ""))
.build();

StatusRuntimeException exc =
assertThrows(
StatusRuntimeException.class, () -> apiClient.applyFeatureTable("default", spec));

assertThat(
exc.getMessage(),
equalTo(
String.format(
"INVALID_ARGUMENT: Updating the value type of a registered Feature is not allowed: %s to %s",
ValueProto.ValueType.Enum.FLOAT, ValueProto.ValueType.Enum.STRING_LIST)));
}

@Test
public void shouldErrorOnInvalidBigQueryTableRef() {
String invalidTableRef = "invalid.bq:path";
Expand Down