@@ -28,7 +28,6 @@ type TestConfig struct {
2828 BertInferenceImage string `flag:"bertInferenceImage" desc:"BERT inference container image"`
2929 InferenceMode string `flag:"inferenceMode" desc:"Inference mode for BERT (throughput or latency)"`
3030 GpuRequested int `flag:"gpuRequested" desc:"Number of GPUs required for inference"`
31- NodeType string `flag:"nodeType" desc:"Instance type for cluster nodes"`
3231}
3332
3433var (
3736)
3837
3938func TestMain (m * testing.M ) {
39+ // Initialize testConfig with default values
4040 testConfig = TestConfig {
4141 InferenceMode : "throughput" ,
4242 GpuRequested : 1 ,
@@ -55,17 +55,16 @@ func TestMain(m *testing.M) {
5555 defer cancel ()
5656 testenv = env .NewWithConfig (cfg ).WithContext (ctx )
5757
58- // Render CloudWatch Agent manifest with dynamic dimensions
59- renderedCloudWatchAgentManifest , err := manifests .RenderCloudWatchAgentManifest (testConfig .MetricDimensions )
60- if err != nil {
61- log .Printf ("Warning: failed to render CloudWatch Agent manifest: %v" , err )
62- }
63-
6458 manifestsList := [][]byte {
6559 manifests .NvidiaDevicePluginManifest ,
6660 }
6761
6862 if len (testConfig .MetricDimensions ) > 0 {
63+ // Render CloudWatch Agent manifest with dynamic dimensions
64+ renderedCloudWatchAgentManifest , err := manifests .RenderCloudWatchAgentManifest (testConfig .MetricDimensions )
65+ if err != nil {
66+ log .Printf ("Warning: failed to render CloudWatch Agent manifest: %v" , err )
67+ }
6968 manifestsList = append (manifestsList , manifests .DCGMExporterManifest , renderedCloudWatchAgentManifest )
7069 }
7170
0 commit comments