-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update observation publisher to use newer sdk (#509)
<!-- Thanks for sending a pull request! Here are some tips for you: 1. Run unit tests and ensure that they are passing 2. If your change introduces any API changes, make sure to update the e2e tests 3. Make sure documentation is updated for your PR! --> **What this PR does / why we need it**: <!-- Explain here the context and why you're making the change. What is the problem you're trying to solve. ---> This is a follow up to #504 , which update the observation publisher to use the latest Merlin SDK. Also introduce the use of piptools to pin the dependencies. Another important changes is using dict instead of the InferenceSchema dataclass. This is because OmegaConf (and by extension, Hydra) does not have a way to instantiate the correct subclass to an abstract class field, so we have to perform our own deserialization instead. **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes # **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. If yes, a release note is required. Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information about release notes, see kubernetes' guide here: http://git.k8s.io/community/contributors/guide/release-notes.md --> NONE ```release-note NONE ``` **Checklist** - [x] Added unit test, integration, and/or e2e tests - [x] Tested locally - [x] Updated documentation - [ ] Update Swagger spec if the PR introduce API changes - [ ] Regenerated Golang and Python client if the PR introduce API changes
- Loading branch information
1 parent
4e084a6
commit b183593
Showing
18 changed files
with
621 additions
and
221 deletions.
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
IMAGE_TAG=dev | ||
OBSERVATION_PUBLISHER_IMAGE_TAG ?= observation-publisher:dev | ||
|
||
.PHONY: observation-publisher | ||
observation-publisher: | ||
@echo "Building image for observation publisher..." | ||
@docker build -t observation-publisher:${IMAGE_TAG} -f observation-publisher/Dockerfile . | ||
@docker build -t ${OBSERVATION_PUBLISHER_IMAGE_TAG} -f observation-publisher/Dockerfile --progress plain . |
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,14 +1,12 @@ | ||
FROM python:3.10 | ||
|
||
WORKDIR /mlobs | ||
|
||
COPY sdk ./sdk | ||
WORKDIR /mlobs/observation-publisher | ||
COPY observation-publisher/requirements.txt . | ||
COPY sdk/ ./sdk | ||
ENV SDK_PATH=/mlobs/sdk | ||
RUN pip install -r requirements.txt | ||
RUN rm requirements.txt | ||
RUN rm -rf sdk | ||
COPY observation-publisher/conf/ ./conf | ||
COPY observation-publisher/publisher/ ./publisher | ||
|
||
WORKDIR /mlobs | ||
COPY observation-publisher ./observation-publisher | ||
WORKDIR /mlobs/observation-publisher | ||
ENTRYPOINT ["python", "-m", "publisher"] |
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
53 changes: 10 additions & 43 deletions
53
python/observation-publisher/conf/environment/example-override.yaml
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.