mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	* Add option to treat GPU as SRIOV in order for stats to work correctly * Add to intel docs * fix tests
		
			
				
	
	
		
			28 lines
		
	
	
		
			911 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			911 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from pydantic import Field
 | 
						|
 | 
						|
from .base import FrigateBaseModel
 | 
						|
 | 
						|
__all__ = ["TelemetryConfig", "StatsConfig"]
 | 
						|
 | 
						|
 | 
						|
class StatsConfig(FrigateBaseModel):
 | 
						|
    amd_gpu_stats: bool = Field(default=True, title="Enable AMD GPU stats.")
 | 
						|
    intel_gpu_stats: bool = Field(default=True, title="Enable Intel GPU stats.")
 | 
						|
    network_bandwidth: bool = Field(
 | 
						|
        default=False, title="Enable network bandwidth for ffmpeg processes."
 | 
						|
    )
 | 
						|
    sriov: bool = Field(
 | 
						|
        default=False, title="Treat device as SR-IOV to support GPU stats."
 | 
						|
    )
 | 
						|
 | 
						|
 | 
						|
class TelemetryConfig(FrigateBaseModel):
 | 
						|
    network_interfaces: list[str] = Field(
 | 
						|
        default=[],
 | 
						|
        title="Enabled network interfaces for bandwidth calculation.",
 | 
						|
    )
 | 
						|
    stats: StatsConfig = Field(
 | 
						|
        default_factory=StatsConfig, title="System Stats Configuration"
 | 
						|
    )
 | 
						|
    version_check: bool = Field(default=True, title="Enable latest version check.")
 |