Skip to content

Commit

Permalink
update & support
Browse files Browse the repository at this point in the history
  • Loading branch information
MrChengmo committed Jan 20, 2021
1 parent de0d25a commit 19eeee5
Show file tree
Hide file tree
Showing 9 changed files with 367 additions and 35 deletions.
13 changes: 6 additions & 7 deletions models/rank/dnn/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,19 @@ runner:
use_gpu: 0

model_path: "static_model.py"
reader_type: "QueueDataset" # DataLoader / QueueDataset
pipe_command: "python static_reader.py"
reader_type: "RecDataset" # DataLoader / QueueDataset / RecDataset
pipe_command: "python benchmark_reader.py"
dataset_debug: False
split_file_list: False

train_batch_size: 1000
train_data_dir: "train_data"
train_reader_path: "static_reader.py"
train_batch_size: 10
train_data_dir: "data/sample_data/train"
train_reader_path: "reader"
model_save_path: "model"
warmup_model_path: ""

infer_batch_size: 2
test_data_dir: "test_data"
infer_reader_path: "static_reader.py"
infer_reader_path: "benchmark_reader"
infer_load_path: "model"
infer_start_epoch: 0
infer_end_epoch: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import six
import os
import copy
import paddle.fluid.incubate.data_generator as dg
import paddle.distributed.fleet as fleet
import logging

cont_min_ = [0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Expand All @@ -31,7 +31,7 @@
logger = logging.getLogger(__name__)


class Reader(dg.MultiSlotDataGenerator):
class Reader(fleet.MultiSlotDataGenerator):
def init(self, config):
self.config = config

Expand Down Expand Up @@ -65,7 +65,7 @@ def reader():
return reader

def dataloader(self, file_list):
"DataLoader Generator"
"DataLoader Pyreader Generator"

def reader():
for file in file_list:
Expand Down
35 changes: 17 additions & 18 deletions models/recall/word2vec/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# 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.
workspace: "./"

hyper_parameters:
optimizer:
learning_rate: 1.0
Expand All @@ -24,27 +22,28 @@ hyper_parameters:
neg_num: 5
window_size: 5

static_benchmark:
epochs: 5
batch_size: 100
print_period: 1000
runner:
epochs: 20
print_interval: 10

sync_mode: "async" # sync / async /geo / heter
sync_mode: "geo" # sync / async /geo / heter
geo_step: 400
thread_num: 16
use_cuda: 0
use_gpu: 0

model_path: "static_model.py"
train_reader_path: "static_reader.py"
reader_type: "QueueDataset" # DataLoader / QueueDataset
dataset_debug: False

model_path: "{workspace}/static_model.py"
reader_path: "{workspace}/static_reader.py"
train_data_path: "{workspace}/train_data"
test_data_path: "{workspace}/test_data"
save_model_path: "{workspace}/model"
split_file_list: False
pipe_command: "python {workspace}/static_reader.py"
pipe_command: "python static_reader.py"
example_count_method: "word"

dataset_debug: False
split_file_list: False

train_batch_size: 100
train_data_dir: "train_data"
train_reader_path: "static_ps_reader.py"
model_save_path: "model"

word_count_dict_path: "{workspace}/dict/word_count_dict.txt"
word_id_dict_path: "{workspace}/dict/word_id_dict.txt"

File renamed without changes.
Loading

0 comments on commit 19eeee5

Please sign in to comment.