project
Creates, updates, deletes, gets or lists a project resource.
Overview
| Name | project |
| Type | Resource |
| Id | azure.ai_text_analytics_authoring.project |
Fields
The following fields are returned by SELECT queries:
- list_trained_models
| Name | Datatype | Description |
|---|---|---|
hasSnapshot | boolean | The flag to indicate if the trained model has a snapshot ready. Required. |
label | string | The trained model label. Required. |
lastTrainedDateTime | string (date-time) | The last trained date time of the model. Required. |
lastTrainingDurationInSeconds | integer | The duration of the model's last training request in seconds. Required. |
modelExpirationDate | string (date) | The model expiration date. Required. |
modelId | string | The model ID. Required. |
modelTrainingConfigVersion | string | The model training config version. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_trained_models | select | project_name, endpoint | top, skip, maxpagesize | Lists the trained models belonging to a project. |
list_training_jobs | exec | project_name, endpoint | top, skip, maxpagesize | Lists the non-expired training jobs created for a project. |
list_deployment_resources | exec | project_name, endpoint | top, skip, maxpagesize | Lists the deployments resources assigned to the project. |
list_deployments | exec | project_name, endpoint | top, skip, maxpagesize | Lists the deployments belonging to a project. |
list_exported_models | exec | project_name, endpoint | top, skip, maxpagesize | Lists the exported models belonging to a project. |
get_project | exec | project_name, endpoint | Gets the details of a project. | |
assign_deployment_resources | exec | project_name, endpoint, resourcesMetadata | Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory _. | |
unassign_deployment_resources | exec | project_name, endpoint, assignedResourceIds | Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. | |
swap_deployments | exec | project_name, endpoint, firstDeploymentName, secondDeploymentName | Swaps two existing deployments with each other. | |
export | exec | project_name, stringIndexType, endpoint | assetKind, trainedModelLabel | Triggers a job to export a project's data. |
import | exec | project_name, endpoint, projectFileVersion, stringIndexType, metadata | format | Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. |
copy_project_authorization | exec | project_name, endpoint | Generates a copy project operation authorization to the current target Azure resource. | |
copy_project | exec | project_name, endpoint, projectKind, targetProjectName, accessToken, expiresAt, targetResourceId, targetResourceRegion | Copies an existing project to another Azure resource. | |
train | exec | project_name, endpoint, modelLabel, trainingConfigVersion | Triggers a training job for a project. | |
cancel_training_job | exec | job_id, project_name, endpoint | Triggers a cancellation for a running training job. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client Endpoint parameter. (default: ) |
job_id | string | The job ID. Required. |
project_name | string | |
stringIndexType | string | Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets _. "Utf16CodeUnit" Required. |
assetKind | string | Kind of asset to export. Default value is None. |
format | string | The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json. Default value is None. |
maxpagesize | integer | |
skip | integer | The number of result items to skip. Default value is None. |
top | integer | The number of result items to return. Default value is None. |
trainedModelLabel | string | Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. Default value is None. |
SELECT examples
- list_trained_models
Lists the trained models belonging to a project.
SELECT
hasSnapshot,
label,
lastTrainedDateTime,
lastTrainingDurationInSeconds,
modelExpirationDate,
modelId,
modelTrainingConfigVersion
FROM azure.ai_text_analytics_authoring.project
WHERE project_name = '{{ project_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND maxpagesize = '{{ maxpagesize }}'
;
Lifecycle Methods
- list_training_jobs
- list_deployment_resources
- list_deployments
- list_exported_models
- get_project
- assign_deployment_resources
- unassign_deployment_resources
- swap_deployments
- export
- import
- copy_project_authorization
- copy_project
- train
- cancel_training_job
Lists the non-expired training jobs created for a project.
EXEC azure.ai_text_analytics_authoring.project.list_training_jobs
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required,
@top='{{ top }}',
@skip='{{ skip }}',
@maxpagesize='{{ maxpagesize }}'
;
Lists the deployments resources assigned to the project.
EXEC azure.ai_text_analytics_authoring.project.list_deployment_resources
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required,
@top='{{ top }}',
@skip='{{ skip }}',
@maxpagesize='{{ maxpagesize }}'
;
Lists the deployments belonging to a project.
EXEC azure.ai_text_analytics_authoring.project.list_deployments
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required,
@top='{{ top }}',
@skip='{{ skip }}',
@maxpagesize='{{ maxpagesize }}'
;
Lists the exported models belonging to a project.
EXEC azure.ai_text_analytics_authoring.project.list_exported_models
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required,
@top='{{ top }}',
@skip='{{ skip }}',
@maxpagesize='{{ maxpagesize }}'
;
Gets the details of a project.
EXEC azure.ai_text_analytics_authoring.project.get_project
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory _.
EXEC azure.ai_text_analytics_authoring.project.assign_deployment_resources
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"resourcesMetadata": "{{ resourcesMetadata }}"
}'
;
Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them.
EXEC azure.ai_text_analytics_authoring.project.unassign_deployment_resources
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"assignedResourceIds": "{{ assignedResourceIds }}"
}'
;
Swaps two existing deployments with each other.
EXEC azure.ai_text_analytics_authoring.project.swap_deployments
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"firstDeploymentName": "{{ firstDeploymentName }}",
"secondDeploymentName": "{{ secondDeploymentName }}"
}'
;
Triggers a job to export a project's data.
EXEC azure.ai_text_analytics_authoring.project.export
@project_name='{{ project_name }}' --required,
@stringIndexType='{{ stringIndexType }}' --required,
@endpoint='{{ endpoint }}' --required,
@assetKind='{{ assetKind }}',
@trainedModelLabel='{{ trainedModelLabel }}'
;
Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced.
EXEC azure.ai_text_analytics_authoring.project.import
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required,
@format='{{ format }}'
@@json=
'{
"projectFileVersion": "{{ projectFileVersion }}",
"stringIndexType": "{{ stringIndexType }}",
"metadata": "{{ metadata }}",
"assets": "{{ assets }}"
}'
;
Generates a copy project operation authorization to the current target Azure resource.
EXEC azure.ai_text_analytics_authoring.project.copy_project_authorization
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Copies an existing project to another Azure resource.
EXEC azure.ai_text_analytics_authoring.project.copy_project
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"projectKind": "{{ projectKind }}",
"targetProjectName": "{{ targetProjectName }}",
"accessToken": "{{ accessToken }}",
"expiresAt": "{{ expiresAt }}",
"targetResourceId": "{{ targetResourceId }}",
"targetResourceRegion": "{{ targetResourceRegion }}"
}'
;
Triggers a training job for a project.
EXEC azure.ai_text_analytics_authoring.project.train
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
@@json=
'{
"modelLabel": "{{ modelLabel }}",
"trainingConfigVersion": "{{ trainingConfigVersion }}",
"evaluationOptions": "{{ evaluationOptions }}",
"dataGenerationSettings": "{{ dataGenerationSettings }}"
}'
;
Triggers a cancellation for a running training job.
EXEC azure.ai_text_analytics_authoring.project.cancel_training_job
@job_id='{{ job_id }}' --required,
@project_name='{{ project_name }}' --required,
@endpoint='{{ endpoint }}' --required
;