Identify the different values for each parameter for any given method from any given class

Rishi Khemka 60 Reputation points
2024-04-26T07:33:19.5133333+00:00

Hi
Below is a snippet of create_project function

Screenshot 2024-04-26 125742

Now the parameters for create_project are
Screenshot 2024-04-26 130000

Now lets say for domain_id or for classification_type i want to see the list of values allowed as parameter, how can i do that ?
Thank you

Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
220 questions
{count} votes

1 answer

Sort by: Most helpful
  1. dupammi 6,810 Reputation points Microsoft Vendor
    2024-04-26T09:36:34.6566667+00:00

    Hi @Rishi Khemka

    Thank you for using the Microsoft Q&A platform.

    To see the list of values allowed as parameters for domain_id and classification_type in the create_project function, you can use the get_domains method to retrieve a list of available domains and their IDs. Here's an example:

    
    from azure.cognitiveservices.vision.customvision.training import CustomVisionTrainingClient
    from azure.cognitiveservices.vision.customvision.training.models import DomainType
    from msrest.authentication import CognitiveServicesCredentials
    
    # Create a CustomVisionTrainingClient object
    trainer = CustomVisionTrainingClient(endpoint, CognitiveServicesCredentials(training_key))
    print("Valid parameters for trainer.get_domains():")
    print(dir(trainer))
    # Get a list of available domains and their IDs
    domains = trainer.get_domains()
    
    for domain in domains:
        if domain.type == DomainType.object_detection and domain.name == "General":
            print(domain.id)
    

    For classification_type, the possible values are 'Multiclass' and 'Multilabel'. You can use either of these values as the input for the classification_type parameter. I hope this helps you to proceed. Thank you.

    0 comments No comments