forked from ace-step/ACE-Step-1.5
-
Notifications
You must be signed in to change notification settings - Fork 4
a SyntaxError is raised in the file preprocess.py #21
Copy link
Copy link
Open
Description
Description:
When running the server script, a SyntaxError is raised in the file preprocess.py due to a duplicate argument name in the function definition of preprocess_to_tensors inside the PreprocessMixin class.
Error Message:
SyntaxError: duplicate argument 'skip_existing' in function definition
File "acestep/training/dataset_builder_modules/preprocess.py", line 57
skip_existing: bool = False,
^^^^^^^^^^^^^^^^^^^
Root Cause:
The function preprocess_to_tensors defines the skip_existing parameter twice in its argument list:
def preprocess_to_tensors(
self,
dit_handler,
output_dir: str,
max_duration: float = 240.0,
skip_existing: bool = False, # First occurrence
preprocess_mode: str = "lora",
progress_callback=None,
skip_existing: bool = False, # Duplicate occurrence causing the syntax error
) -> Tuple[List[str], str]:
Python syntax does not allow duplicate parameter names in function definitions, leading to this error.
Steps to Reproduce:
1. Clone or download the repository.
2. Activate the virtual environment.
3. Run the server script, e.g. ./3、run_server.ps1.
4. Observe the traceback ending with the above SyntaxError.
Expected Behavior:
The script should load and run without syntax errors.
Actual Behavior:
Script fails with SyntaxError caused by duplicate argument skip_existing.
Suggested Fix:
Remove the duplicate skip_existing argument from the function signature. The corrected function header should be:
def preprocess_to_tensors(
self,
dit_handler,
output_dir: str,
max_duration: float = 240.0,
skip_existing: bool = False,
preprocess_mode: str = "lora",
progress_callback=None,
) -> Tuple[List[str], str]:
Please address this issue to allow successful execution of the preprocessing function and server startup.
Thank you.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels