You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor: backup and proto
* refactor: transfer
* refactor: swanlab settings
* Refactor backup and transfer modules structure
Moved backup-related modules from swanlab.data.backup to swanlab.log.backup and transfer modules from swanlab.data.transfers to swanlab.transfers. Updated all relevant imports and usages throughout the codebase. Refactored Transfer and ProtoV0Transfer to accept media_dir and file_dir as constructor arguments. Improved error log uploading in CloudPyCallback and unified backup handler usage.
* Refactor backup handler and callbackers for improved modularity
Refactored BackupHandler to accept run parameters directly instead of accessing run_store internally, improving modularity and testability. Updated cloud, local, and offline callbackers to pass run parameters explicitly and to use run_store consistently. Added access control to get_run_store to restrict usage to swanlab.data module. Moved uploader imports to explicit usage and centralized error log uploading in ProtoV0Transfer.
* Refactor callbacker module and unify callback logic
Moved and refactored callback logic from swanlab/data/run/callback.py into swanlab/data/callbacker/callback.py, and updated cloud, local, and offline callback implementations to inherit from the new base class. Centralized utility functions in swanlab/data/callbacker/utils.py and updated all callbackers to use these shared utilities for printing and path formatting. Removed redundant code and improved maintainability by reducing duplication and clarifying callback registration and cleanup logic.
* Refactor data transfer and backup architecture
Removed legacy transfer and backup modules, consolidating data transfer logic into a new ProtoTransfer singleton in swanlab/data/transfer.py. Updated callbackers to use ProtoTransfer for logging, metric, and runtime info handling. Migrated DataStore to swanlab/data, removed async_io utility, and cleaned up related imports and usages. Adjusted tests and internal references to reflect new module structure and APIs.
* Refactor DataPorter for unified data sync and trace modes
Replaces the previous ProtoTransfer and ModelsParser logic with a new DataPorter class that supports both experiment trace and sync upload modes, centralizing backup file parsing, data publishing, and resource management. Updates all callbackers and sync logic to use DataPorter, removes ModelsParser from proto/v0.py, and adds platformdirs to requirements. This refactor improves maintainability and consistency for experiment data handling and synchronization.
* Add synced decorator and improve backup handling
Applied the @synced decorator to DataPorter methods to ensure thread safety. Improved backup handling in SwanLabRun by deleting the run directory when backup is disabled. Updated SwanLabInitializer to use a system runtime directory for logs when backup is off, ensuring proper log storage.
* Update __init__.py
* Refactor test setup and store access control
Introduced an @inside decorator to restrict access to RunStore functions to the swanlab.data module or test runtime. Refactored test utilities to use a new UseMockRunState context manager for consistent client and store state management in tests. Updated imports and test code to align with these changes, improving test isolation and reliability.
* Refactor local callback and improve config error handling
Refactored LocalRunCallback to set logdir via environment variable and updated tests to use UseMockRunState for better isolation. Changed SwanLabRun to default operator to None. Cleared callbacks after validation in SwanLabInitializer. Improved and relocated error handling for invalid config parameters from test_config.py to test_sdk.py, adding more comprehensive tests for config input validation.
* Add disabled callback mode and refactor logdir handling
Introduced DisabledCallback for 'disabled' mode, ensuring proper handling when runs are not to be saved or uploaded. Refactored logdir initialization logic in SwanLabInitializer to unify and simplify directory setup for all modes, and moved run_dir cleanup logic from main.py to the cloud callback. Updated operator creation to use DisabledCallback in disabled mode.
* chore: fix test
* fix: test
* chore: fix typing
* chore: change cache dir
* chore: some misc
* fix: code
0 commit comments