Connect to a DLC task node for debugging
When a DLC training job fails, you often have nothing to work with except logs and guesswork. An environment connection lets you enter a specific node (Pod) of the DLC job from your DSW instance, inspect training processes and logs in the terminal, or have Agentic PAI Code run diagnostics on that node.
Prerequisites
A running DSW instance with Environment connection shown in the upper-right corner of the development environment.
Access to the target DLC job in the same region as the DSW instance, and a target Pod that is running.
Connect to a node through environment connection
Select the target node
Log on to the PAI console, select the target region and workspace, and choose Model Development and Training > Interactive Modeling (DSW). In the Actions column of the target instance, click Open.
-
In the upper-right corner of the development environment, click Environment connection, and then click New connection.
Workspace: The current workspace is searched by default. If the target job is in another workspace, select All workspaces in the same region.
DLC job: In the drop-down list, search by job name or job ID and select the target job.
Node (Pod): Select the node to debug. For a distributed job with multiple nodes, verify the Pod name.
Establish a connection to the node
Environment connection offers two modes: standard connection and enhanced connection. They differ in whether an Agent takes part and whether the connection has a time limit.
|
Connection mode |
Scenario |
Requirements and duration |
|
Standard connection |
Interactive debugging in a Terminal, such as viewing logs or checking processes. |
Any available Pod works. No connection duration is required. |
|
Enhanced connection |
An Agent runs commands on the target Pod, or you re-enter the node from a Terminal while the connection is still valid. |
The DSW instance and the DLC job must use the same Virtual Private Cloud (VPC). The connection duration starts when pairing succeeds. |
The following table compares the two modes in detail:
Establish a standard connection
Select Standard connection and click Establish connection. In the confirmation dialog box, verify the job name and Pod ID, read the production environment notice, and then click Establish connection again.
-
The system opens a Terminal. On first use, complete the confirmation as prompted in the Terminal. When the following message appears, you're in the target Pod and can run debugging commands.
# connected to <Pod name> (Ctrl-D or 'exit' to quit) When debugging is done, enter
exitor press Ctrl+D to leave the remote shell.
Establish an enhanced connection
In the job list, select a job marked Enhanced available, select the target Pod, and then select Enhanced connection. In Management duration, enter the connection duration in hours. The default is 12 hours and the maximum is 24 hours.
Click Establish connection. Verify the job name, Pod ID, and connection duration, read the notice, and then click Establish connection again and follow the Terminal prompts to complete pairing.
Return to the environment connection list. After the target record shows In progress and an expiry time, click Terminal in that row to enter the same Pod again.
Connect to a node with Agentic PAI Code
-
Open Agentic PAI Code from the DSW launcher and enter the following example instruction in the dialog box.
/pai-dsw-connect Connect to the running DLC job that was started most recently in the current workspace and supports enhanced connection. If there are multiple Pods, list them first so I can choose. Confirm the target as prompted. After the connection succeeds, verify the job ID and Pod name in the response. In the same session, you can continue with an instruction such as "List the 5 processes using the most memory on the Pod you just connected to."
Commands from the terminal and from the Agent both run with the permissions of the target identity. Operations such as writing files or stopping processes affect the running training job.
Manage connections
In the upper-right corner of the development environment, click Environment connection. You can search records by job ID, connection ID, or Pod ID, and filter them by start time, connection mode, or status.
|
Operation |
Applicable records |
Description |
|
Open terminal |
In-progress enhanced connections |
Click Terminal to enter the target Pod through the existing connection. |
|
Extend connection |
In-progress enhanced connections |
Click Extend connection, verify the current expiry time, enter the extension duration, and confirm. Each extension can add up to 24 hours, and the total validity from successful pairing is up to 7 days. |
|
Disconnect |
In-progress connections |
Click Disconnect, verify the Pod ID and connection ID, and confirm. Changes that have been made persist and background processes may keep running. |
|
Reconnect |
Closed, expired, or failed connections |
Verify that the target Pod is still running, click Reconnect, and follow the on-screen prompts. |
|
Delete record |
Closed, expired, or failed connections |
Click Delete record, or select multiple deletable records and click Batch delete. |
FAQ
Q: What do I do if I can't find the target job or Pod?
Check the workspace scope and region, search again by job ID, and click Refresh in the job or Pod list. If the job has ended and the Pod has been released, view the historical logs on the DLC job details page. To open a terminal, select a Pod that is still running.
Q: Why can't I select enhanced connection?
Select the DLC job and node first, then check whether the job is marked Enhanced available. Verify that the DSW instance and the DLC job use the same VPC ID. If you only need to debug manually in a terminal, use the standard connection offered on the page.
Q: How do I troubleshoot a failed connection?
Click the status icon next to Failed in the connection list to view the failure reason. Verify the job and node status, resolve the issue as prompted, and click Reconnect. The same record also lets you re-establish an expired enhanced connection.