MCPcopy
hub / github.com/mosaicml/composer / from_file_name

Method from_file_name

composer/callbacks/oom_observer.py:37–44  ·  view source on GitHub ↗
(cls, filename: str)

Source from the content-addressed store, hash-verified

35
36 @classmethod
37 def from_file_name(cls, filename: str) -> 'SnapshotFileNameConfig':
38 return cls(
39 snapshot_file=filename + '_snapshot.pickle',
40 trace_plot_file=filename + '_trace_plot.html',
41 segment_plot_file=filename + '_segment_plot.html',
42 segment_flamegraph_file=filename + '_segment_flamegraph.svg',
43 memory_flamegraph_file=filename + '_memory_flamegraph.svg',
44 )
45
46 def list_filenames(self) -> list[str]:
47 return [getattr(self, field.name) for field in dataclasses.fields(self)]

Callers 1

oom_observerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected