-
Notifications
You must be signed in to change notification settings - Fork 998
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
Create empty Job Service #1059
Merged
Merged
Create empty Job Service #1059
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
docs | ||
!docs/coverage | ||
charts | ||
env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM python:3.7-slim-buster | ||
|
||
USER root | ||
WORKDIR /feast | ||
|
||
COPY sdk/python sdk/python | ||
COPY Makefile Makefile | ||
COPY protos protos | ||
|
||
# Install make | ||
RUN apt-get update && apt-get -y install make git | ||
|
||
# Install Python dependencies | ||
RUN make compile-protos-python | ||
|
||
# Install Feast SDK | ||
COPY .git .git | ||
COPY README.md README.md | ||
RUN pip install -e sdk/python -U | ||
|
||
CMD ["feast", "server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
// | ||
// Copyright 2018 The Feast Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
syntax = "proto3"; | ||
package feast.core; | ||
|
||
option go_package = "github.com/feast-dev/feast/sdk/go/protos/feast/core"; | ||
option java_outer_classname = "JobServiceProto"; | ||
option java_package = "feast.proto.core"; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
import "feast/core/DataSource.proto"; | ||
import "feast/serving/ServingService.proto"; | ||
|
||
service JobService { | ||
// Start job to ingest data from offline store into online store | ||
rpc StartOfflineToOnlineIngestionJob (StartOfflineToOnlineIngestionJobRequest) returns (StartOfflineToOnlineIngestionJobResponse); | ||
|
||
// Produce a training dataset, return a job id that will provide a file reference | ||
rpc GetHistoricalFeatures (GetHistoricalFeaturesRequest) returns (GetHistoricalFeaturesResponse); | ||
|
||
// Start job to ingest data from stream into online store | ||
rpc StartStreamToOnlineIngestionJob (StartStreamToOnlineIngestionJobRequest) returns (StartStreamToOnlineIngestionJobResponse); | ||
|
||
// List all types of jobs | ||
rpc ListJobs (ListJobsRequest) returns (ListJobsResponse); | ||
|
||
// Stop a single job | ||
rpc StopJob (StopJobRequest) returns (StopJobResponse); | ||
|
||
// Get details of a single job | ||
rpc GetJob (GetJobRequest) returns (GetJobResponse); | ||
} | ||
|
||
|
||
enum JobType { | ||
INVALID_JOB = 0; | ||
OFFLINE_TO_ONLINE_JOB = 1; | ||
STREAM_TO_ONLINE_JOB = 2; | ||
EXPORT_JOB = 4; | ||
} | ||
|
||
enum JobStatus { | ||
JOB_STATUS_INVALID = 0; | ||
// The Job has be registered and waiting to get scheduled to run | ||
JOB_STATUS_PENDING = 1; | ||
// The Job is currently processing its task | ||
JOB_STATUS_RUNNING = 2; | ||
// The Job has successfully completed its task | ||
JOB_STATUS_DONE = 3; | ||
// The Job has encountered an error while processing its task | ||
JOB_STATUS_ERROR = 4; | ||
} | ||
|
||
message Job { | ||
// Identifier of the Job | ||
string id = 1; | ||
// External Identifier of the Job assigned by the Spark executor | ||
string external_id = 2; | ||
// Type of the Job | ||
JobType type = 3; | ||
// Current job status | ||
JobStatus status = 4; | ||
// Timestamp on when the job was is created | ||
google.protobuf.Timestamp created_timestamp = 5; | ||
// Timestamp on when the job has stopped. | ||
google.protobuf.Timestamp stop_timestamp = 6; | ||
|
||
message ExportJobMeta { | ||
// Glob of the exported files that should be retrieved to reconstruct | ||
// the dataframe with retrieved features. | ||
repeated string file_glob = 1; | ||
// The Historical Features request that triggered this export job | ||
GetHistoricalFeaturesRequest request = 2; | ||
} | ||
|
||
message OfflineToOnlineMeta { | ||
// Reference to the Feature Table being populated by this job | ||
string project = 1; | ||
string table_name = 2; | ||
} | ||
|
||
message StreamToOnlineMeta { | ||
// Reference to the Feature Table being populated by this job | ||
string project = 1; | ||
string table_name = 2; | ||
} | ||
|
||
// JobType specific metadata on the job | ||
oneof meta { | ||
ExportJobMeta export = 7; | ||
OfflineToOnlineMeta offline_to_online = 8; | ||
StreamToOnlineMeta stream_to_online = 9; | ||
} | ||
} | ||
|
||
// Ingest data from offline store into online store | ||
message StartOfflineToOnlineIngestionJobRequest { | ||
// Feature table to ingest | ||
string project = 1; | ||
string table_name = 2; | ||
|
||
// Start of time range for source data from offline store | ||
google.protobuf.Timestamp start_date = 3; | ||
|
||
// End of time range for source data from offline store | ||
google.protobuf.Timestamp end_date = 4; | ||
} | ||
|
||
message StartOfflineToOnlineIngestionJobResponse { | ||
// Job ID assigned by Feast | ||
string id = 1; | ||
} | ||
|
||
message GetHistoricalFeaturesRequest { | ||
// List of features that are being retrieved | ||
repeated feast.serving.FeatureReferenceV2 features = 1; | ||
|
||
// Batch DataSource that can be used to obtain entity values for historical retrieval. | ||
// For each entity value, a feature value will be retrieved for that value/timestamp | ||
// Only 'BATCH_*' source types are supported. | ||
// Currently only BATCH_FILE source type is supported. | ||
DataSource entities_source = 2; | ||
|
||
// Optional field to specify project name override. If specified, uses the | ||
// given project for retrieval. Overrides the projects specified in | ||
// Feature References if both are specified. | ||
string project = 3; | ||
|
||
// Specifies the path in a bucket to write the exported feature data files | ||
// Export to AWS S3 - s3://path/to/features | ||
// Export to GCP GCS - gs://path/to/features | ||
string destination_path = 4; | ||
} | ||
|
||
message GetHistoricalFeaturesResponse { | ||
// Export Job with ID assigned by Feast | ||
string id = 1; | ||
} | ||
|
||
message StartStreamToOnlineIngestionJobRequest { | ||
// Feature table to ingest | ||
string project = 1; | ||
string table_name = 2; | ||
} | ||
|
||
message StartStreamToOnlineIngestionJobResponse { | ||
// Job ID assigned by Feast | ||
string id = 1; | ||
} | ||
|
||
message ListJobsRequest { | ||
Filter filter = 1; | ||
message Filter { | ||
// Filter jobs by job type | ||
JobType type = 1; | ||
// Filter jobs by current job status | ||
JobStatus status = 2; | ||
} | ||
} | ||
|
||
message ListJobsResponse { | ||
repeated Job jobs = 1; | ||
} | ||
|
||
message GetJobRequest { | ||
string job_id = 1; | ||
} | ||
|
||
message GetJobResponse { | ||
Job job = 1; | ||
} | ||
|
||
message RestartJobRequest { | ||
string job_id = 1; | ||
} | ||
|
||
message RestartJobResponse {} | ||
|
||
message StopJobRequest{ | ||
string job_id = 1; | ||
} | ||
|
||
message StopJobResponse {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we copy git into the docker file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like git is used by sdk/python/setup.py here https://github.com/feast-dev/feast/blob/master/sdk/python/setup.py#L52. If I remove this line docker build step errors out.
Also I copied this mostly from the jupyter dockerfile, which contains the similar build step. We could improve docker build files by removing the dependency on git (seems like it's only used to copy the readme file from the git repo root), but I think that's probably better handled by another PR.