-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from Yancey1989/demo_trainer
Support public datacenter
- Loading branch information
Showing
12 changed files
with
137 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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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,4 @@ | ||
FROM paddlepaddle/paddle:latest | ||
RUN python -c "import paddle.v2.dataset.common as common; common.fetch_all()" | ||
ADD ./prepare.py /root/ | ||
CMD ["python", "/root/prepare.py"] |
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,39 @@ | ||
import paddle.v2.dataset as dataset | ||
import shutil | ||
import os | ||
dataset_home = os.getenv("DATASET_HOME") | ||
os.system("mv %s %s" % (dataset.common.DATA_HOME, dataset_home)) | ||
|
||
dataset.common.DATA_HOME = dataset_home | ||
dataset.common.split(dataset.uci_housing.train(), | ||
line_count = 500, | ||
suffix=dataset_home + "/uci_housing/train-%05d.pickle") | ||
dataset.common.split(dataset.mnist.train(), | ||
line_count = 500, | ||
suffix=dataset_home + "/mnist/train-%05d.pickle") | ||
dataset.common.split(dataset.cifar.train10(), | ||
line_count = 500, | ||
suffix=dataset_home + "/cifar/train10-%05d.pickel") | ||
|
||
N = 5 | ||
word_dict = dataset.imikolov.build_dict() | ||
dict_size = len(word_dict) | ||
dataset.common.split(dataset.imikolov.train(word_dict, 5), | ||
line_count = 500, | ||
suffix = dataset_home + "/imikolov/train-%05d.pickle") | ||
|
||
dataset.common.split(dataset.movielens.train(), | ||
line_count = 500, | ||
suffix = dataset_home + "/movielens/train-%05d.pickle") | ||
|
||
dataset.common.split(lambda: dataset.imdb.train(dataset.imdb.word_dict()), | ||
line_count = 500, | ||
suffix = dataset_home + "/imdb/train-%05d.pickle") | ||
|
||
dataset.common.split(dataset.conll05.test(), | ||
line_count = 500, | ||
suffix = dataset_home + "/conll05/test-%05d.pickle") | ||
|
||
dataset.common.split(dataset.wmt14.train(30000), | ||
line_count = 500, | ||
suffix = dataset_home + "wmt14/train-%05d.pickle") |
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,28 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: paddle-prepare | ||
spec: | ||
template: | ||
metadata: | ||
name: paddle-prepare | ||
spec: | ||
volumes: | ||
- name: data-storage | ||
cephfs: | ||
monitors: | ||
- 172.19.32.166:6789 | ||
path: "/public" | ||
user: "admin" | ||
secretRef: | ||
name: ceph-secret | ||
containers: | ||
- name: prepare | ||
image: yancey1989/paddlecloud-prepare | ||
env: | ||
- name: DATASET_HOME | ||
value: "/pfs/public/dataset" | ||
volumeMounts: | ||
- name: data-storage | ||
mountPath: /pfs/public | ||
restartPolicy: Never |
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