Updated on 2024-08-14 GMT+08:00

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")
  • Debug mode

    You can use the debug mode only in a notebook environment with the next() method. Example:

    1. Start the debug mode.
      workflow.debug(steps=[label_step, release_step, job_step, model_step, service_step], experiment_id="Experiment record ID")
    2. 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"))
    3. 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.