Question 70
A training component receives a folder path in an input declared as uri_file and crashes when enumerating files. What should the author correct?
Explanation
Correct Answer
Typed input declarations determine how resources are mounted or downloaded; the component interface must reflect the supplied data structure.
Incorrect Answers
Declare a component output and write the artifact to that output location. A separate source case supports that approach when: A pipeline's preprocessing step writes a model artifact to its temporary working directory, so the downstream training step cannot find it. The supporting rationale or observable result is: Declared outputs provide the handoff path between component steps; ephemeral local files are not automatic pipeline outputs. This question describes a different issue: A training component receives a folder path in an input declared as uri_file and crashes when enumerating files. Address it through Change the component's input declaration to the actual compatible URI type, with the required justification or evidence: Typed input declarations determine how resources are mounted or downloaded; the component interface must reflect the supplied data structure.
Bind the pipeline's intended data asset to the component's required training_data input. This is useful for the distinct issue: A component invocation fails because its required input named training_data is missing from the pipeline definition. The relevant technical rationale or evidence for that issue is: Component contracts require each mandatory input binding; compute scale settings cannot supply an absent data reference. Here the reported issue is: A training component receives a folder path in an input declared as uri_file and crashes when enumerating files. The relevant response is: Change the component's input declaration to the actual compatible URI type. The first result cannot verify this different correction: Typed input declarations determine how resources are mounted or downloaded; the component interface must reflect the supplied data structure.
Register the reusable component and reference the component asset version from each workspace. It addresses another case: A data-preparation component must be reused by two different Azure ML workspaces without copying Python source into both projects. For that case, the distinguishing justification or acceptance check is: A versioned component carries executable interface metadata and avoids diverging ad hoc copies of preprocessing code. The present case instead states: A training component receives a folder path in an input declared as uri_file and crashes when enumerating files. It calls for Change the component's input declaration to the actual compatible URI type. Showing success for the other case would not establish: Typed input declarations determine how resources are mounted or downloaded; the component interface must reflect the supplied data structure.