MCPcopy Create free account
hub / github.com/espnet/espnet / set

Method set

espnet2/bin/asr_align.py:90–103  ·  view source on GitHub ↗

Update properties. Args: **kwargs: Key-value dict that contains all properties with their new values. Unknown properties are ignored.

(self, **kwargs)

Source from the content-addressed store, hash-verified

88 self.set(**kwargs)
89
90 def set(self, **kwargs):
91 """Update properties.
92
93 Args:
94 **kwargs: Key-value dict that contains all properties
95 with their new values. Unknown properties are ignored.
96 """
97 for key in kwargs:
98 if (
99 not key.startswith("_")
100 and hasattr(self, key)
101 and kwargs[key] is not None
102 ):
103 setattr(self, key, kwargs[key])
104
105 def __str__(self):
106 """Return a kaldi-style ``segments`` file (string)."""

Callers 4

__init__Method · 0.95
log_stageFunction · 0.45
__call__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected