-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use custom HttpRequest builder to set customized useragent header for…
… TFX. PiperOrigin-RevId: 385225372
- Loading branch information
1 parent
f6d6fdd
commit e630b08
Showing
10 changed files
with
59 additions
and
44 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
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 |
---|---|---|
|
@@ -74,12 +74,6 @@ LABEL maintainer="[email protected]" | |
|
||
RUN python -m pip install --upgrade pip | ||
|
||
# TODO(b/151392812): Remove `google-api-python-client` and `google-apitools` | ||
# when patching is not needed any more. | ||
RUN python -m pip install \ | ||
"google-api-python-client==1.8.0" \ | ||
"google-apitools==0.5.30" | ||
|
||
COPY --from=wheel-builder /tfx/src/dist/*.whl /tfx/src/dist/ | ||
WORKDIR /tfx/src | ||
|
||
|
@@ -93,12 +87,3 @@ RUN MLSDK_WHEEL=$(find dist -name "ml_pipelines_sdk-*.whl"); \ | |
python -m pip install ${MLSDK_WHEEL} ${TFX_WHEEL}[docker-image] ; \ | ||
fi && \ | ||
echo "Installed python packages:\n" && python -m pip list | ||
|
||
# Patch http.py in googleapiclient and base_api.py in apitools | ||
# to use our own UserAgent. | ||
# TODO(b/151392812): Remove this when other telemetries become available. | ||
COPY --from=wheel-builder /tfx/src/tfx/tools/docker/patches /tfx/src/tfx/tools/docker/patches | ||
RUN patch `python -c 'import googleapiclient; print(googleapiclient.__path__[0])'`/http.py \ | ||
/tfx/src/tfx/tools/docker/patches/http.patch && \ | ||
patch `python -c 'import apitools; print(apitools.__path__[0])'`/base/py/base_api.py \ | ||
/tfx/src/tfx/tools/docker/patches/base_api.patch |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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