Skip to content

Workspace.get_targets() returns None for targets where no default Target class is specified #147

@guenp

Description

@guenp

Problem: If no default target is specified, Workspace.get_targets() returns None and throws a confusing warning message.
The reason why no Target is returned is because we don't have the following parameters that are required for the Target constructor:

provider_id: str = "",
input_data_format: str = "",
output_data_format: str = "",
content_type: str = "",
encoding: str = "",

Without this information a Target instance cannot be used to submit a Job.

MicrosoftTeams-image (2)

Proposed solution: If no default target is specified, return a Target instance that will fail if you call .submit().

Thanks @xinyi-joffre for catching this.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions