Getting "The category parameter is invalid." when using custom language model with translation services

Sheldon Lyttle 21 Reputation points
2023-12-04T18:07:23.1966667+00:00

I have a Power Automate flow that successfully translates English into French using the standard language model.

I have subsequently trained a custom language model to get better results, and am trying to integration into the translation service by adding the categorization ID into the Start Translation action.

Unfortunately, each time I run the flow, the Start Translation action fails with the following error:

{
        "error": {
            "code": "InvalidRequest",
            "message": "The category parameter is invalid.",
            "target": "Category",
            "innerError": {
                "code": "InvalidCategory",
                "message": "The category parameter is invalid."
            }

The service is running in the Canada Central data centre, and so I initially published the language model to the North American Region ... I then expanded that to EVERY region to eliminate this as a possible issue .... no joy.

I then realized that the user that I built the model with was not the same as the one that was executing the flow, so I shared the model with that user ..... no dice.

Not quite sure where to go from here, and hoping someone may have encountered and resolved a similar issue in the past.

Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
473 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,261 questions
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 53,931 Reputation points
    2023-12-04T21:16:16.2733333+00:00

    @Sheldon Lyttle

    Sheldon,

    It seems you've already taken some steps to troubleshoot the issue with integrating your custom language model into the translation service. Here are a few additional steps you might consider to resolve the "The category parameter is invalid" error:

    1. Verify Category ID: Double-check the category ID you're using to ensure it's exactly correct. It should match the custom category ID provided by the translation service when you created and trained your custom model.
    2. Access Permissions: Ensure that the user executing the flow has the necessary permissions to use the custom language model. You mentioned sharing the model with the user, but also confirm that the user has the appropriate role and access rights within the translation service.
    3. API Endpoint: Verify that you're using the correct API endpoint for the translation service that corresponds to the region where your custom model is deployed. Even if you've published the model to multiple regions, you need to use the endpoint specific to the region you're targeting in your flow.
    4. API Version: Check if the translation service requires a specific API version to use custom models. The API version is typically part of the endpoint URL, and using an outdated or incorrect version can lead to errors.
    5. Authentication: Confirm that the authentication method and credentials used in the flow are correct. This might involve checking API keys or tokens, and ensuring they have not expired.
    6. Subscription Key: Make sure you're using the correct subscription key associated with the service where your custom model is hosted. Sometimes, different services or resources within the same cloud provider require different keys.
    7. Model Deployment Status: Check the status of your custom model to ensure it's fully trained and deployed. Sometimes, a model might still be in a pending or incomplete state, which could cause errors when trying to use it.
    8. Service Quotas: Verify that you haven't exceeded any service quotas or limits that might prevent the custom model from being invoked.
    9. Error Logs: Look at detailed error logs if available. Sometimes, cloud service providers offer more detailed logs through their dashboard or a separate logging service.

    If all else fails, please share the error logs to us if there is no confidential information. There may be specific steps or configurations required by the service that are not immediately apparent.

    Remember to also test the custom model directly using a simple REST client or the service's test interface to ensure the model is working independently of the Power Automate flow. This can help isolate the issue to either the model itself or the way it's being called in the flow.

    I hope this helps.

    Regards,

    Yutong

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.