Skip to content

Commit 900f02c

Browse files
Solves #2846 Refactor run_opts into a @DataClass (#2855)
Co-authored-by: Peter Plantinga <plantinga.peter@proton.me>
1 parent bca9c76 commit 900f02c

7 files changed

Lines changed: 454 additions & 474 deletions

File tree

speechbrain/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@
66
# For redirect of HF transformers
77
import speechbrain.lobes.models # noqa: F401
88

9-
from .core import Brain, Stage, create_experiment_directory, parse_arguments
9+
from .core import Brain, Stage, create_experiment_directory
1010
from .utils.importutils import deprecated_redirect, lazy_export_all
11+
from .utils.run_opts import RunOptions
1112

1213
with open(
1314
os.path.join(os.path.dirname(__file__), "version.txt"), encoding="utf-8"
1415
) as f:
1516
version = f.read().strip()
1617

18+
# Create an alias to the refactored function
19+
parse_arguments = RunOptions.from_command_line_args
20+
1721
__all__ = [
1822
"Stage",
1923
"Brain",

0 commit comments

Comments
 (0)