Debugging a Workflow
After creating a workflow, you can debug it in the development state. You can use the run or debug modes for debugging. Suppose a workflow has five phases: label_step, release_step, job_step, model_step, and service_step. The debugging steps are as follows:
- Run mode
- Running all phases
workflow.run(steps=[label_step, release_step, job_step, model_step, service_step], experiment_id="Experiment record ID")
- Running job_step, model_step, and service_step (Ensure the correctness of data dependency for partial execution.)
workflow.run(steps=[job_step, model_step, service_step], experiment_id="Experiment record ID")
- Running all phases
- Debug mode
You can use the debug mode only in a notebook environment with the next() method. Example:
- Start the debug mode.
workflow.debug(steps=[label_step, release_step, job_step, model_step, service_step], experiment_id="Experiment record ID")
- Run the first phase.
workflow.next()
As a result, either of the following situations occur:
- If the data required for running the phase is available, the phase will be executed directly.
- If the data required for running the phase is unavailable, configure phase data in either of the following ways:
- Configuring a parameter:
workflow.set_placeholder ("Parameter name", Value)
- Configuring a data object:
workflow.set_data (Name of the data object, Data object)
# Example: Configuring a dataset object. workflow.set_data("Object name", Dataset(dataset_name="Dataset name", version_name="Dataset version name"))
- Configuring a parameter:
- After the execution on the preceding phase is completed, use workflow.next() to start the next phase. Then, repeat the operations until all phases have been executed.
When you debug a workflow in the development state, the system only monitors the running status and prints logs. To view the detailed running information of each phase, go to the ModelArts console.
- Start the debug mode.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot