Skip to content

Commit

Permalink
Temporarily remove mxnet trainer list input test (#2446)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyita authored Jun 15, 2020
1 parent 3ca4903 commit e30d782
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions pyzoo/test/zoo/orca/learn/mxnet/test_mxnet_ray_xshards.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,25 @@ def test_xshards_gluon(self):
num_workers=2)
trainer.train(nb_epoch=2)

def test_xshard_list(self):
# prepare data
resource_path = os.path.join(os.path.split(__file__)[0], "../../../resources")
self.ray_ctx = get_ray_ctx()
train_file_path = os.path.join(resource_path,
"orca/learn/multi_input_json/train_data_list.json")
train_data_shard = zoo.orca.data.pandas.read_json(train_file_path, self.ray_ctx,
orient="records", lines=False)
train_data_shard.transform_shard(prepare_data_list)
test_file_path = os.path.join(resource_path,
"orca/learn/multi_input_json/test_data_list.json")
test_data_shard = zoo.orca.data.pandas.read_json(test_file_path, self.ray_ctx,
orient="records", lines=False)
test_data_shard.transform_shard(prepare_data_list)
config = create_trainer_config(batch_size=32, log_interval=1, seed=42)
trainer = MXNetTrainer(config, train_data_shard, get_gluon_model, get_loss,
validation_metrics_creator=get_gluon_metrics,
test_data=test_data_shard, eval_metrics_creator=get_gluon_metrics)
trainer.train(nb_epoch=2)
# def test_xshard_list(self):
# # prepare data
# resource_path = os.path.join(os.path.split(__file__)[0], "../../../resources")
# self.ray_ctx = get_ray_ctx()
# train_file_path = os.path.join(resource_path,
# "orca/learn/multi_input_json/train_data_list.json")
# train_data_shard = zoo.orca.data.pandas.read_json(train_file_path, self.ray_ctx,
# orient="records", lines=False)
# train_data_shard.transform_shard(prepare_data_list)
# test_file_path = os.path.join(resource_path,
# "orca/learn/multi_input_json/test_data_list.json")
# test_data_shard = zoo.orca.data.pandas.read_json(test_file_path, self.ray_ctx,
# orient="records", lines=False)
# test_data_shard.transform_shard(prepare_data_list)
# config = create_trainer_config(batch_size=32, log_interval=1, seed=42)
# trainer = MXNetTrainer(config, train_data_shard, get_gluon_model, get_loss,
# validation_metrics_creator=get_gluon_metrics,
# test_data=test_data_shard, eval_metrics_creator=get_gluon_metrics)
# trainer.train(nb_epoch=2)


if __name__ == "__main__":
Expand Down

0 comments on commit e30d782

Please sign in to comment.