MCPcopy Index your code
hub / github.com/FlashSampling/FlashSampling / ModalEnvConfig

Class ModalEnvConfig

src/fused_mm_sampling/modal_lib/utils.py:10–28  ·  view source on GitHub ↗

Common env-var config shared by Modal benchmark scripts. Fields are read from same-named env vars (case-insensitive). Subclass to add script-specific fields or override defaults.

Source from the content-addressed store, hash-verified

8
9
10class ModalEnvConfig(BaseSettings):
11 """Common env-var config shared by Modal benchmark scripts.
12
13 Fields are read from same-named env vars (case-insensitive).
14 Subclass to add script-specific fields or override defaults.
15 """
16
17 gpu: str = "b200"
18 n_procs: int = 1
19 name: str | None = None
20 n_hidden_states: int = 1
21 case: str = "small"
22 bench_fn: str = "fi-cupti"
23
24 timeout: int = 20 * 60
25
26 @property
27 def gpu_spec(self) -> str:
28 return f"{self.gpu}:{self.n_procs}" if self.n_procs > 1 else self.gpu
29
30
31def make_app():

Calls

no outgoing calls

Tested by

no test coverage detected