Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Feature/backup#30

Merged
SAKURA-CAT merged 4 commits intomainfrom
feature/backup
Jun 3, 2025
Merged

Feature/backup#30
SAKURA-CAT merged 4 commits intomainfrom
feature/backup

Conversation

@SAKURA-CAT
Copy link
Copy Markdown
Member

This pull request introduces updates to the swankit project, including changes to versioning, callback function parameters, and environment modes. The most notable changes involve adding a new environment mode (BACKUP) and modifying callback functions to enhance flexibility and usability.

Versioning Update:

Callback Function Enhancements:

Environment Mode Updates:

  • swankit/env.py: Replaced the CLOUD_ONLY mode with a new BACKUP mode in the SwanLabMode enum.
  • swankit/env.py: Updated the documentation for the SwanLabSharedEnv enum to reflect the addition of the BACKUP mode.

@SAKURA-CAT SAKURA-CAT requested a review from Copilot June 3, 2025 14:00
@SAKURA-CAT SAKURA-CAT self-assigned this Jun 3, 2025
@SAKURA-CAT SAKURA-CAT added the enhancement New feature or request label Jun 3, 2025
Copy link
Copy Markdown

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 introduces a new BACKUP environment mode, enhances callback signatures for flexibility, and bumps the project version to 0.2.1.

  • Add BACKUP mode to SwanLabMode and update related documentation.
  • Modify on_init callback signature by inserting a public parameter and remove the unused num parameter from before_init_experiment.
  • Bump project version in pyproject.toml from 0.2.0 to 0.2.1.

Reviewed Changes

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

File Description
swankit/env.py Replaced CLOUD_ONLY with BACKUP in SwanLabMode and updated the shared env docstring.
swankit/callback/init.py Added public parameter to on_init and removed num from before_init_experiment.
pyproject.toml Updated version to 0.2.1.
Comments suppressed due to low confidence (1)

swankit/env.py:52

  • The new BACKUP mode should have accompanying tests to verify correct behavior in environment detection and callback registration.
swanlab的解析模式,涉及操作员注册的回调,目前有四种:local、cloud、disabled 和 backup,默认为cloud

"""

def on_init(self, proj_name: str, workspace: str, logdir: str = None, *args, **kwargs):
def on_init(self, proj_name: str, workspace: str, public: bool = None, logdir: str = None, *args, **kwargs):
Copy link

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

Reordering the signature by inserting public before logdir may break existing implementations that rely on positional arguments. Consider placing public after logdir or supporting both signatures for backward compatibility.

Copilot uses AI. Check for mistakes.
@SAKURA-CAT SAKURA-CAT merged commit 74967fc into main Jun 3, 2025
5 checks passed
@SAKURA-CAT SAKURA-CAT deleted the feature/backup branch June 3, 2025 14:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants