Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add remote graph decomposer #570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
leon062112 wants to merge 1 commit into PaddlePaddle:develop
base: develop
Choose a base branch
Loading
from leon062112:feature/remote-sample-executor

Conversation

@leon062112
Copy link
Contributor

@leon062112 leon062112 commented Jan 15, 2026

PR Category

Feature Enhancement

Description

Add Remote Graph Decomposer

Copilot AI review requested due to automatic review settings January 15, 2026 13:14
Copy link

paddle-bot bot commented Jan 15, 2026

Thanks for your contribution!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds remote graph decomposition capability to enable running graph decomposition operations on a remote server via gRPC. The implementation includes a client module that uploads models to a remote server, an entry point module that executes the decomposition on the server side, and a test script to validate the functionality.

Changes:

  • Added client-side remote graph decomposer to orchestrate remote execution
  • Added server-side entry point to handle remote decomposition requests
  • Added test script to validate remote graph decomposition workflow

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 17 comments.

File Description
graph_net/torch/remote_graph_decomposer.py Client module that uploads models to remote server and retrieves decomposition results
graph_net/torch/remote_graph_decomposer_entry.py Server-side entry point that processes remote decomposition requests and executes graph_net.torch.run_model
graph_net_rpc/test/test_remote_graph_decomposer.sh Test script that validates remote graph decomposition workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

help="Log filename to create under $OUTPUT_WORKSPACE.",
)
args = parser.parse_args()
main(args)
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main function returns an exit code (int) but it is not used. This should be sys.exit(main(args)) to properly propagate the exit code from the subprocess execution.

Suggested change
main(args)
sys.exit(main(args))

Copilot uses AI. Check for mistakes.
parser.add_argument(
"--log-file",
type=str,
default="log_remote_decompose.txt",
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default log filename 'log_remote_decompose.txt' is inconsistent with the variable name in remote_graph_decomposer.py which defaults to 'log_remote_graph_decomposer.txt'. These should match for consistency.

Suggested change
default="log_remote_decompose.txt",
default="log_remote_graph_decomposer.txt",

Copilot uses AI. Check for mistakes.
log_name = candidates[0]
else:
print(
f"[remote_subgraph_decomposer] Remote log not found. expected={log_name}, candidates={candidates}",
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log prefix '[remote_subgraph_decomposer]' is inconsistent with the module name 'remote_graph_decomposer'. Should use '[remote_graph_decomposer]' for consistency.

Copilot uses AI. Check for mistakes.
print("===== End remote log =====\n", file=sys.stderr, flush=True)
except Exception as e:
print(
f"[remote_subgraph_decomposer] Failed to decode remote log {log_name}: {e} (bytes={len(data)})",
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log prefix '[remote_subgraph_decomposer]' is inconsistent with the module name 'remote_graph_decomposer'. Should use '[remote_graph_decomposer]' for consistency.

Copilot uses AI. Check for mistakes.
rpc_cmd = _build_remote_rpc_cmd(args)

print(
f"[remote_subgraph_decomposer] model_path: {model_path}",
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log prefix '[remote_subgraph_decomposer]' is inconsistent with the module name 'remote_graph_decomposer'. Should use '[remote_graph_decomposer]' for consistency.

Copilot uses AI. Check for mistakes.
flush=True,
)
print(
f"[remote_subgraph_decompose_entry] INPUT_WORKSPACE: {input_workspace}",
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log prefix '[remote_subgraph_decompose_entry]' is inconsistent with the module name 'remote_graph_decomposer_entry'. Should use '[remote_graph_decomposer_entry]' for consistency.

Copilot uses AI. Check for mistakes.
flush=True,
)
print(
f"[remote_subgraph_decompose_entry] OUTPUT_WORKSPACE: {output_workspace}",
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log prefix '[remote_subgraph_decompose_entry]' is inconsistent with the module name 'remote_graph_decomposer_entry'. Should use '[remote_graph_decomposer_entry]' for consistency.

Copilot uses AI. Check for mistakes.
flush=True,
)
print(
f"[remote_subgraph_decompose_entry] log_path: {log_path}",
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log prefix '[remote_subgraph_decompose_entry]' is inconsistent with the module name 'remote_graph_decomposer_entry'. Should use '[remote_graph_decomposer_entry]' for consistency.

Copilot uses AI. Check for mistakes.
flush=True,
)
print(
f"[remote_subgraph_decompose_entry] cmd: {' '.join(cmd)}",
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log prefix '[remote_subgraph_decompose_entry]' is inconsistent with the module name 'remote_graph_decomposer_entry'. Should use '[remote_graph_decomposer_entry]' for consistency.

Copilot uses AI. Check for mistakes.

if proc.returncode != 0:
print(
f"[remote_subgraph_decompose_entry][ERROR] run_model failed with returncode={proc.returncode}. "
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log prefix '[remote_subgraph_decompose_entry]' is inconsistent with the module name 'remote_graph_decomposer_entry'. Should use '[remote_graph_decomposer_entry]' for consistency.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /