convert_to_v2_config

opennmt.convert_to_v2_config(v1_config)[source]

Converts a V1 configuration to its V2 equivalent.

Parameters

v1_config – The V1 configuration.

Returns

The V2 configuration.

Raises

ValueError – if the conversion can not be done automatically.