-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce distributed Adaptive API (#326)
This PR adds distributed Adaptive API to Texar-PyTorch with the help of AdaptDL. `examples/bert/bert_classifier_adaptive.py` is the adaptive version of `examples/bert/bert_classifier_main.py` which demonstrates the use of above API. It can be trained on a cluster by running `examples/bert/run_bert_adaptive.sh` after setting up a AdaptDL kubernetes cluster or microk8s environment
- Loading branch information
Showing
11 changed files
with
552 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2019 The Texar Authors. All Rights Reserved. | ||
# | ||
# 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 | ||
# | ||
# http://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. | ||
|
||
|
||
FROM python:3.7-slim | ||
WORKDIR /root | ||
|
||
FROM pytorch/pytorch:1.6.0-cuda10.1-cudnn7-runtime | ||
|
||
COPY . texar-pytorch | ||
WORKDIR texar-pytorch | ||
|
||
RUN python3 setup.py bdist_wheel | ||
ARG TEXAR_VERSION=0.0.0 | ||
RUN TEXAR_VERSION=${TEXAR_VERSION} pip install dist/*.whl | ||
RUN pip install -r requirements.txt | ||
|
||
RUN pip install tensorflow adaptdl>=0.2.4 tensorboard | ||
RUN rm -rf dist | ||
|
||
ENV PYTHONUNBUFFERED=true |
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.