How to run AutoML NER Job?

Stefan Chu 0 Reputation points
2025-02-13T21:36:31.8+00:00
# Create the AutoML job with the related factory-function.

exp_name = "dpv2-nlp-text-ner-experiment"
exp_timeout = 60
text_ner_job = automl.text_ner(
    experiment_name=exp_name,
    compute=compute_name,
    training_data=my_training_data_input,
    validation_data=my_validation_data_input,
    tags={"my_custom_tag": "My custom value"},
)

text_ner_job.set_limits(timeout_minutes=exp_timeout)

# Submit the AutoML job

returned_hf_job = ml_client.jobs.create_or_update(
    text_ner_hf_job
)  # submit the job to the backend

print(f"Created job: {returned_hf_job}")


User's image

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,185 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Manas Mohanty 1,850 Reputation points Microsoft External Staff
    2025-02-14T12:09:50.88+00:00

    Hi Stefan Chu

    Correct syntax as per automl class is below.

       from azure.ai.ml import automl, Input
       from azure.ai.ml.constants import AssetTypes
       text_ner_job = automl.TextNerJob(
           experiment_name="my_experiment",
           compute="my_compute",
           training_data=Input(type=AssetTypes.MLTABLE, path="./training-mltable-folder"),
           validation_data=Input(type=AssetTypes.MLTABLE, path="./validation-mltable-folder"),
           tags={"my_custom_tag": "My custom value"},
       )
       returned_hf_job = ml_client.jobs.create_or_update(text_ner_job )
    
    
    

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    Thank you.

    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.