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)
]
)