2

I am training a model with the Experiment class and although the documentation seems to suggest you can have more than one export strategy:

export_strategies: Iterable of ExportStrategys, or a single one, or None.

When I include two I get an error while training with ml engine:

 AssertionError: Export directory already exists. Please specify a different export directory

When using the make_export_strategy function there is no option to specify the export directory.

Am I approaching this in the wrong way? Ultimately I want people to be able to make prediction requests to the same model with CSV and JSON inputs.

 tf.contrib.learn.Experiment(
    estimator=estimator,
    train_input_fn=train_input,
    eval_input_fn=eval_input,
    eval_metrics=eval_metrics,
    train_steps=train_steps,
    eval_steps=eval_steps,
    eval_delay_secs=eval_delay_secs,
    min_eval_frequency=min_eval_frequency,        
    export_strategies=[
      saved_model_export_utils.make_export_strategy(
        serving_input_fn=csv_serving_input_fn,
        exports_to_keep=1),
      saved_model_export_utils.make_export_strategy(
        serving_input_fn=json_serving_input_fn,
        exports_to_keep=1)
    ]
 )
dobbysock1002
  • 907
  • 10
  • 15
  • Looks like a bug (as of TensorFlow 1.2.1). I get the same error when both export strategies have `exports_to_keep` specified (omitting it or explicitly setting it to 5 on either seems to be a workaround). Would you mind [opening an issue on Github](https://github.com/tensorflow/tensorflow/issues)? CCing allenlavoie and ispirmustafa (github accounts) will get the issue triaged more quickly. – Allen Lavoie Jul 05 '17 at 19:56

0 Answers0