<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/modeling/hyperparams/params_dict.py#L455-L497) |

Override a given ParamsDict using a dict, JSON/YAML/CSV string or YAML file.

#### View aliases


**Main aliases**

[`tfm.hyperparams.params_dict.override_params_dict`](https://www.tensorflow.org/api_docs/python/tfm/hyperparams/override_params_dict)

<br />

    tfm.hyperparams.override_params_dict(
        params, dict_or_string_or_yaml_file, is_strict
    )

The logic of the function is outlined below:

1. Test that the input is a dict. If not, proceed to 2.
2. Tests that the input is a string. If not, raise unknown ValueError 2.1. Test if the string is in a CSV format. If so, parse. If not, proceed to 2.2. 2.2. Try loading the string as a YAML/JSON. If successful, parse to dict and use it to override. If not, proceed to 2.3. 2.3. Try using the string as a file path and load the YAML file.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `params` | a ParamsDict object to be overridden. |
| `dict_or_string_or_yaml_file` | a Python dict, JSON/YAML/CSV string or path to a YAML file specifying the parameters to be overridden. |
| `is_strict` | a boolean specifying whether override is strict or not. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `params` | the overridden ParamsDict object. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if failed to override the parameters. |

<br />