Google AutoML Connector: Difference between revisions

From Okapi Framework
Jump to navigation Jump to search
 
(6 intermediate revisions by 2 users not shown)
Line 4: Line 4:


This is a connector for [https://cloud.google.com/translate/automl/docs/ Google AutoML Translation], a service that allows users to train custom models and use them for translation. If you don't require a custom model, consider using the [[Google MT v2 Connector]] instead.
This is a connector for [https://cloud.google.com/translate/automl/docs/ Google AutoML Translation], a service that allows users to train custom models and use them for translation. If you don't require a custom model, consider using the [[Google MT v2 Connector]] instead.
Note that AutoML Translation is currently in beta. In order to use the connector, you'll need to [https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating_a_service_account create a Google service account] and [https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys download a private key JSON file] for the account. API keys are [https://groups.google.com/forum/#!topic/google-translate-api/e3sOLcC1qZI not supported] by the service.


{{WarningBox|The end-user is solely responsible for the costs of using this service. The developers of the Okapi Framework do their best to provide bug-free components and they are not liable, in any way, for any cost incurred by the end-user even when caused by defective code.}}
{{WarningBox|The end-user is solely responsible for the costs of using this service. The developers of the Okapi Framework do their best to provide bug-free components and they are not liable, in any way, for any cost incurred by the end-user even when caused by defective code.}}
Line 11: Line 9:
==Using the Connector==
==Using the Connector==


TODO
In order to use the connector, you'll need to [https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating_a_service_account create a Google service account] and [https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys download a private key JSON file] for the account.
 
You must train a model for each language pair you intend to use with the connector. Google has a [https://cloud.google.com/translate/automl/docs/quickstart tutorial] on how to train a model through the AutoML Translation UI. You can also use the AutoML Translation API to [https://cloud.google.com/translate/automl/docs/tutorial train models programatically].


==Parameters==
==Parameters==


TODO
<cite>Credential file path</cite> (internal name: <tt>credentialFilePath</tt>) &mdash; Absolute path on your filesystem to a JSON file containing private key information for a Google service account. This is the same JSON file described in the previous section.
 
<cite>Model JSON map</cite> (internal name: <tt>modelMap</tt>) &mdash; A JSON string that maps a language pair to the resource name of the model that will process translations for that language pair. Model resource names are typically of the form <code>projects/{projectId}/locations/{computeRegion}/models/{modelId}</code>.
 
Example: <code>{"en-US/ja-JP": "projects/my-project/locations/us-central1/models/ABC123", "en-US/de-DE": "projects/my-project/locations/us-central1/models/DEF456"}</code>
 
<cite>Credential string</cite> (internal name: <tt>credentialString</tt>) &mdash; JSON string containing private key information for a Google service account. This parameter is not exposed through the UI but can be set programmatically. It is used only if the <tt>credentialFilePath</tt> is null or empty.


==Limitations==
==Limitations==


TODO
* AutoML Translation is currently in BETA.
* Unlike the [[Google MT v2 Connector]], API keys cannot be used with this connector due to a [https://groups.google.com/forum/#!topic/google-translate-api/e3sOLcC1qZI limitation] of the AutoML Translation API.
* The connector does not retry API calls when they fail.


[[Category:Connectors]]
[[Category:Connectors]]

Latest revision as of 17:01, 31 October 2018

Overview

This is a connector for Google AutoML Translation, a service that allows users to train custom models and use them for translation. If you don't require a custom model, consider using the Google MT v2 Connector instead.

Warning: The end-user is solely responsible for the costs of using this service. The developers of the Okapi Framework do their best to provide bug-free components and they are not liable, in any way, for any cost incurred by the end-user even when caused by defective code.

Using the Connector

In order to use the connector, you'll need to create a Google service account and download a private key JSON file for the account.

You must train a model for each language pair you intend to use with the connector. Google has a tutorial on how to train a model through the AutoML Translation UI. You can also use the AutoML Translation API to train models programatically.

Parameters

Credential file path (internal name: credentialFilePath) — Absolute path on your filesystem to a JSON file containing private key information for a Google service account. This is the same JSON file described in the previous section.

Model JSON map (internal name: modelMap) — A JSON string that maps a language pair to the resource name of the model that will process translations for that language pair. Model resource names are typically of the form projects/{projectId}/locations/{computeRegion}/models/{modelId}.

Example: {"en-US/ja-JP": "projects/my-project/locations/us-central1/models/ABC123", "en-US/de-DE": "projects/my-project/locations/us-central1/models/DEF456"}

Credential string (internal name: credentialString) — JSON string containing private key information for a Google service account. This parameter is not exposed through the UI but can be set programmatically. It is used only if the credentialFilePath is null or empty.

Limitations

  • AutoML Translation is currently in BETA.
  • Unlike the Google MT v2 Connector, API keys cannot be used with this connector due to a limitation of the AutoML Translation API.
  • The connector does not retry API calls when they fail.