# tfma.default_writers

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/api/model_eval_lib.py#L770-L852) |

Returns the default writers for use in WriteResults.

    tfma.default_writers(
        output_path: Optional[str],
        eval_shared_model: Optional[https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/types/EvalSharedModel] = None,
        eval_config: Optional[https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/EvalConfig] = None,
        display_only_data_location: Optional[str] = None,
        display_only_data_file_format: Optional[str] = None,
        output_file_format: str = 'tfrecord',
        add_metric_callbacks: Optional[List[types.AddMetricsCallbackType]] = None
    ) -> List[https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/writers/Writer]

Note, sharding will be enabled by default if an output_file_format is
provided. Filenames will be -SSSSS-of-NNNNN. where SSSSS is the shard number and NNNNN is the number of shards.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `output_path` | Output path. |
| `eval_shared_model` | Optional shared model (single-model evaluation) or list of shared models (multi-model evaluation). Required unless the predictions are provided alongside of the features (i.e. model-agnostic evaluations). |
| `eval_config` | Eval config for writing out config along with results. Also used for to check for missing slices. |
| `display_only_data_location` | Optional path indicating where the examples were read from. This is used only for display purposes - data will not actually be read from this path. |
| `display_only_data_file_format` | Optional format of the input examples. This is used only for display purposes. |
| `output_file_format` | File format to use when saving files. Currently only 'tfrecord' is supported. |
| `add_metric_callbacks` | Optional list of metric callbacks (if used). |

<br />