Encord currently supports hosting your platform instance globally or in the US. The Global and the US instances have complete feature parity with each other. The major differences are the following:
Global and US instances are completely independent of each other.
If you are using Encord’s US based hosted platform, ALL authentication for the SDK MUST include the following:
Copy
domain="https://api.us.encord.com"
Copy
# Import dependenciesfrom encord import EncordUserClient# Authenticate with Encord using the path to your private keyuser_client = EncordUserClient.create_with_ssh_private_key( ssh_private_key_path="<private_key_path>", domain="https://api.us.encord.com",)
All templates in the documentation work for both the US and Global deployments. While the examples below use the US deployment for clarity, you can adapt any SDK template to the US deployment by simply updating the domain parameter in the authentication call, even if a US-specific example is not provided.
The US templates MUST include domain for authentication:
# Import dependenciesfrom encord import EncordUserClientfrom encord.metadata_schema import MetadataSchemaSSH_PATH = "<file-path-to-ssh-private-key>"# Authenticate with Encord using the path to your private keyuser_client = EncordUserClient.create_with_ssh_private_key( ssh_private_key_path=SSH_PATH)# Create the schemametadata_schema = user_client.metadata_schema()# Add various metadata fieldsmetadata_schema.add_scalar("metadata_1", data_type="boolean")metadata_schema.add_scalar("metadata_2", data_type="datetime")metadata_schema.add_scalar("metadata_3", data_type="number")metadata_schema.add_scalar("metadata_4", data_type="uuid")metadata_schema.add_scalar("metadata_5", data_type="varchar")metadata_schema.add_scalar("metadata_6", data_type="text")# Add an enum fieldmetadata_schema.add_enum("my-enum", values=["enum-value-01", "enum-value-02", "enum-value-03"])# Add embedding fieldsmetadata_schema.add_embedding('my-test-active-embedding', size=512)metadata_schema.add_embedding('my-test-index-embedding', size=<values-from-1-to-4096>)# Save the schemametadata_schema.save()# Print the schema for verificationprint(metadata_schema)