@@ -57,7 +57,7 @@ describe('inferenceChartToCsv', () => {
5757
5858 it ( 'exports all raw benchmark fields' , ( ) => {
5959 const data = [ makePoint ( ) ] ;
60- const { headers, rows } = inferenceChartToCsv ( data ) ;
60+ const { headers, rows } = inferenceChartToCsv ( data , 'llama-3.1-405b' , '1k/1k' ) ;
6161
6262 // Should have all metric columns
6363 expect ( headers ) . toContain ( 'Throughput/GPU (tok/s)' ) ;
@@ -71,9 +71,22 @@ describe('inferenceChartToCsv', () => {
7171 expect ( rows ) . toHaveLength ( 1 ) ;
7272 } ) ;
7373
74+ it ( 'includes Model, ISL, and OSL columns from model and sequence' , ( ) => {
75+ const data = [ makePoint ( ) ] ;
76+ const { headers, rows } = inferenceChartToCsv ( data , 'llama-3.1-405b' , '1k/8k' ) ;
77+ const row = rows [ 0 ] ;
78+
79+ expect ( headers [ 0 ] ) . toBe ( 'Model' ) ;
80+ expect ( headers [ 1 ] ) . toBe ( 'ISL' ) ;
81+ expect ( headers [ 2 ] ) . toBe ( 'OSL' ) ;
82+ expect ( row [ 0 ] ) . toBe ( 'llama-3.1-405b' ) ;
83+ expect ( row [ 1 ] ) . toBe ( 1024 ) ;
84+ expect ( row [ 2 ] ) . toBe ( 8192 ) ;
85+ } ) ;
86+
7487 it ( 'includes throughput and latency values in correct columns' , ( ) => {
7588 const data = [ makePoint ( ) ] ;
76- const { headers, rows } = inferenceChartToCsv ( data ) ;
89+ const { headers, rows } = inferenceChartToCsv ( data , 'llama-3.1-405b' , '1k/1k' ) ;
7790 const row = rows [ 0 ] ;
7891
7992 const tputIdx = headers . indexOf ( 'Throughput/GPU (tok/s)' ) ;
@@ -88,13 +101,13 @@ describe('inferenceChartToCsv', () => {
88101
89102 it ( 'filters out hidden data points' , ( ) => {
90103 const data = [ makePoint ( ) , makePoint ( { hidden : true } ) ] ;
91- const { rows } = inferenceChartToCsv ( data ) ;
104+ const { rows } = inferenceChartToCsv ( data , 'llama-3.1-405b' , '1k/1k' ) ;
92105 expect ( rows ) . toHaveLength ( 1 ) ;
93106 } ) ;
94107
95108 it ( 'includes disaggregated and parallelism fields' , ( ) => {
96109 const data = [ makePoint ( { disagg : true , num_prefill_gpu : 2 , num_decode_gpu : 6 , ep : 4 } ) ] ;
97- const { headers, rows } = inferenceChartToCsv ( data ) ;
110+ const { headers, rows } = inferenceChartToCsv ( data , 'llama-3.1-405b' , '1k/1k' ) ;
98111 const row = rows [ 0 ] ;
99112
100113 expect ( row [ headers . indexOf ( 'Disaggregated' ) ] ) . toBe ( true ) ;
@@ -104,7 +117,7 @@ describe('inferenceChartToCsv', () => {
104117 } ) ;
105118
106119 it ( 'handles empty data' , ( ) => {
107- const { rows } = inferenceChartToCsv ( [ ] ) ;
120+ const { rows } = inferenceChartToCsv ( [ ] , 'llama-3.1-405b' , '1k/1k' ) ;
108121 expect ( rows ) . toHaveLength ( 0 ) ;
109122 } ) ;
110123
@@ -129,7 +142,7 @@ describe('inferenceChartToCsv', () => {
129142 costri : { y : 0 , roof : false } ,
130143 } as InferenceData ,
131144 ] ;
132- const { headers, rows } = inferenceChartToCsv ( data ) ;
145+ const { headers, rows } = inferenceChartToCsv ( data , 'llama-3.1-405b' , '1k/1k' ) ;
133146 const row = rows [ 0 ] ;
134147
135148 // Missing optional fields should be ''
0 commit comments