Skip to content

fix: add resolve source path#1697

Open
Nexisato wants to merge 2 commits into
mainfrom
fix/relative-path-resolve
Open

fix: add resolve source path#1697
Nexisato wants to merge 2 commits into
mainfrom
fix/relative-path-resolve

Conversation

@Nexisato

Copy link
Copy Markdown
Collaborator

Description

  • 多机器挂载时 save 逻辑的 path 解析问题

Close: #1691

@Nexisato Nexisato self-assigned this Jun 29, 2026
@Nexisato Nexisato added the 🐛 bug Something isn't working label Jun 29, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a path resolution helper _resolve_save_source in sender.py to handle cross-machine synchronization scenarios where the original absolute source_path is unreadable. It implements fallback logic to look up files within the run's files directory, and updates upload_save to use this resolved path. Comprehensive unit tests are also added to verify this fallback behavior. The reviewer pointed out a potential cross-platform issue where Windows-style backslashes in save.source_path or save.name would fail to resolve correctly on POSIX systems, and suggested using PureWindowsPath to normalize the paths.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread swanlab/sdk/internal/core_python/transport/sender.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working

Projects

None yet

1 participant