How to use the feast.core.CoreService_pb2.ApplyFeatureSetResponse function in feast

To help you get started, weโ€™ve selected a few feast examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gojek / feast / sdk / python / feast / client.py View on Github external
timeout=GRPC_CONNECTION_TIMEOUT_APPLY,
            )  # type: ApplyFeatureSetResponse
        except grpc.RpcError as e:
            raise grpc.RpcError(e.details())

        # Extract the returned feature set
        applied_fs = FeatureSet.from_proto(apply_fs_response.feature_set)

        # If the feature set has changed, update the local copy
        if apply_fs_response.status == ApplyFeatureSetResponse.Status.CREATED:
            print(
                f'Feature set updated/created: "{applied_fs.name}:{applied_fs.version}"'
            )

        # If no change has been applied, do nothing
        if apply_fs_response.status == ApplyFeatureSetResponse.Status.NO_CHANGE:
            print(f"No change detected or applied: {feature_set.name}")

        # Deep copy from the returned feature set to the local feature set
        feature_set._update_from_feature_set(applied_fs)
github gojek / feast / sdk / python / feast / core / CoreService_pb2_grpc.py View on Github external
response_serializer=feast_dot_core_dot_CoreService__pb2.GetFeatureSetResponse.SerializeToString,
      ),
      'ListFeatureSets': grpc.unary_unary_rpc_method_handler(
          servicer.ListFeatureSets,
          request_deserializer=feast_dot_core_dot_CoreService__pb2.ListFeatureSetsRequest.FromString,
          response_serializer=feast_dot_core_dot_CoreService__pb2.ListFeatureSetsResponse.SerializeToString,
      ),
      'ListStores': grpc.unary_unary_rpc_method_handler(
          servicer.ListStores,
          request_deserializer=feast_dot_core_dot_CoreService__pb2.ListStoresRequest.FromString,
          response_serializer=feast_dot_core_dot_CoreService__pb2.ListStoresResponse.SerializeToString,
      ),
      'ApplyFeatureSet': grpc.unary_unary_rpc_method_handler(
          servicer.ApplyFeatureSet,
          request_deserializer=feast_dot_core_dot_CoreService__pb2.ApplyFeatureSetRequest.FromString,
          response_serializer=feast_dot_core_dot_CoreService__pb2.ApplyFeatureSetResponse.SerializeToString,
      ),
      'UpdateStore': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateStore,
          request_deserializer=feast_dot_core_dot_CoreService__pb2.UpdateStoreRequest.FromString,
          response_serializer=feast_dot_core_dot_CoreService__pb2.UpdateStoreResponse.SerializeToString,
      ),
      'CreateProject': grpc.unary_unary_rpc_method_handler(
          servicer.CreateProject,
          request_deserializer=feast_dot_core_dot_CoreService__pb2.CreateProjectRequest.FromString,
          response_serializer=feast_dot_core_dot_CoreService__pb2.CreateProjectResponse.SerializeToString,
      ),
      'ArchiveProject': grpc.unary_unary_rpc_method_handler(
          servicer.ArchiveProject,
          request_deserializer=feast_dot_core_dot_CoreService__pb2.ArchiveProjectRequest.FromString,
          response_serializer=feast_dot_core_dot_CoreService__pb2.ArchiveProjectResponse.SerializeToString,
      ),
github gojek / feast / sdk / python / feast / client.py View on Github external
feature_set_proto.spec.project = self.project

        # Convert the feature set to a request and send to Feast Core
        try:
            apply_fs_response = self._core_service_stub.ApplyFeatureSet(
                ApplyFeatureSetRequest(feature_set=feature_set_proto),
                timeout=GRPC_CONNECTION_TIMEOUT_APPLY,
            )  # type: ApplyFeatureSetResponse
        except grpc.RpcError as e:
            raise grpc.RpcError(e.details())

        # Extract the returned feature set
        applied_fs = FeatureSet.from_proto(apply_fs_response.feature_set)

        # If the feature set has changed, update the local copy
        if apply_fs_response.status == ApplyFeatureSetResponse.Status.CREATED:
            print(
                f'Feature set updated/created: "{applied_fs.name}:{applied_fs.version}"'
            )

        # If no change has been applied, do nothing
        if apply_fs_response.status == ApplyFeatureSetResponse.Status.NO_CHANGE:
            print(f"No change detected or applied: {feature_set.name}")

        # Deep copy from the returned feature set to the local feature set
        feature_set._update_from_feature_set(applied_fs)
github gojek / feast / sdk / python / feast / core / CoreService_pb2_grpc.py View on Github external
response_deserializer=feast_dot_core_dot_CoreService__pb2.GetFeatureSetResponse.FromString,
        )
    self.ListFeatureSets = channel.unary_unary(
        '/feast.core.CoreService/ListFeatureSets',
        request_serializer=feast_dot_core_dot_CoreService__pb2.ListFeatureSetsRequest.SerializeToString,
        response_deserializer=feast_dot_core_dot_CoreService__pb2.ListFeatureSetsResponse.FromString,
        )
    self.ListStores = channel.unary_unary(
        '/feast.core.CoreService/ListStores',
        request_serializer=feast_dot_core_dot_CoreService__pb2.ListStoresRequest.SerializeToString,
        response_deserializer=feast_dot_core_dot_CoreService__pb2.ListStoresResponse.FromString,
        )
    self.ApplyFeatureSet = channel.unary_unary(
        '/feast.core.CoreService/ApplyFeatureSet',
        request_serializer=feast_dot_core_dot_CoreService__pb2.ApplyFeatureSetRequest.SerializeToString,
        response_deserializer=feast_dot_core_dot_CoreService__pb2.ApplyFeatureSetResponse.FromString,
        )
    self.UpdateStore = channel.unary_unary(
        '/feast.core.CoreService/UpdateStore',
        request_serializer=feast_dot_core_dot_CoreService__pb2.UpdateStoreRequest.SerializeToString,
        response_deserializer=feast_dot_core_dot_CoreService__pb2.UpdateStoreResponse.FromString,
        )
    self.CreateProject = channel.unary_unary(
        '/feast.core.CoreService/CreateProject',
        request_serializer=feast_dot_core_dot_CoreService__pb2.CreateProjectRequest.SerializeToString,
        response_deserializer=feast_dot_core_dot_CoreService__pb2.CreateProjectResponse.FromString,
        )
    self.ArchiveProject = channel.unary_unary(
        '/feast.core.CoreService/ArchiveProject',
        request_serializer=feast_dot_core_dot_CoreService__pb2.ArchiveProjectRequest.SerializeToString,
        response_deserializer=feast_dot_core_dot_CoreService__pb2.ArchiveProjectResponse.FromString,
        )