Skip to content

Commit

Permalink
update experiment naming
Browse files Browse the repository at this point in the history
Signed-off-by: Lenson <[email protected]>
  • Loading branch information
nosnelmil committed Feb 27, 2025
1 parent 02ee380 commit 3190451
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion tools/multi_loader/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ func UpdateExperimentWithSweepIndices(experiment *types.LoaderExperiment, sweepO
paths := SplitPath(experiment.Config["OutputPathPrefix"].(string))
// update the last two paths with the sweep indices
paths[len(paths)-2] = paths[len(paths)-2] + experimentPostFix
paths[len(paths)-1] = paths[len(paths)-1] + experimentPostFix

experiment.Config["OutputPathPrefix"] = path.Join(paths...)

Expand Down
2 changes: 1 addition & 1 deletion tools/multi_loader/common/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestUpdateExperimentWithSweepIndices(t *testing.T) {
assert.Equal(t, "test_experiment"+expectedPostfix, experiment.Name)

// Check OutputPathPrefix
expectedOutputPathPrefix := path.Join("first", "second"+expectedPostfix, "third"+expectedPostfix)
expectedOutputPathPrefix := path.Join("first", "second"+expectedPostfix, "third")
assert.Equal(t, expectedOutputPathPrefix, experiment.Config["OutputPathPrefix"])

// Verify that the sweep options have been updated
Expand Down
12 changes: 6 additions & 6 deletions tools/multi_loader/runner/multi_loader_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func validateGridSweepOutput(t *testing.T, output []types.LoaderExperiment) {
Name: "test1_ExperimentDuration_10_PostScript_1",
Config: map[string]interface{}{
"WarmupDuration": 10.0,
"OutputPathPrefix": "data/out_ExperimentDuration_10_PostScript_1/test_output_ExperimentDuration_10_PostScript_1",
"OutputPathPrefix": "data/out_ExperimentDuration_10_PostScript_1/test_output",
"ExperimentDuration": 10.0,
},
PostScript: "touch data/out/scripts/test_postscript_1",
Expand All @@ -378,7 +378,7 @@ func validateGridSweepOutput(t *testing.T, output []types.LoaderExperiment) {
Name: "test1_ExperimentDuration_10_PostScript_2",
Config: map[string]interface{}{
"WarmupDuration": 10.0,
"OutputPathPrefix": "data/out_ExperimentDuration_10_PostScript_2/test_output_ExperimentDuration_10_PostScript_2",
"OutputPathPrefix": "data/out_ExperimentDuration_10_PostScript_2/test_output",
"ExperimentDuration": 10.0,
},
PostScript: "touch data/out/scripts/test_postscript_2",
Expand All @@ -387,7 +387,7 @@ func validateGridSweepOutput(t *testing.T, output []types.LoaderExperiment) {
Name: "test1_ExperimentDuration_20_PostScript_1",
Config: map[string]interface{}{
"WarmupDuration": 10.0,
"OutputPathPrefix": "data/out_ExperimentDuration_20_PostScript_1/test_output_ExperimentDuration_20_PostScript_1",
"OutputPathPrefix": "data/out_ExperimentDuration_20_PostScript_1/test_output",
"ExperimentDuration": 20.0,
},
PostScript: "touch data/out/scripts/test_postscript_1",
Expand All @@ -396,7 +396,7 @@ func validateGridSweepOutput(t *testing.T, output []types.LoaderExperiment) {
Name: "test1_ExperimentDuration_20_PostScript_2",
Config: map[string]interface{}{
"WarmupDuration": 10.0,
"OutputPathPrefix": "data/out_ExperimentDuration_20_PostScript_2/test_output_ExperimentDuration_20_PostScript_2",
"OutputPathPrefix": "data/out_ExperimentDuration_20_PostScript_2/test_output",
"ExperimentDuration": 20.0,
},
PostScript: "touch data/out/scripts/test_postscript_2",
Expand All @@ -418,7 +418,7 @@ func validateLinearSweepOutput(t *testing.T, output []types.LoaderExperiment) {
Name: "test1_ExperimentDuration_10_PostScript_1",
Config: map[string]interface{}{
"WarmupDuration": 10.0,
"OutputPathPrefix": "data/out_ExperimentDuration_10_PostScript_1/test_output_ExperimentDuration_10_PostScript_1",
"OutputPathPrefix": "data/out_ExperimentDuration_10_PostScript_1/test_output",
"ExperimentDuration": 10.0,
},
PostScript: "touch data/out/scripts/test_postscript_1",
Expand All @@ -427,7 +427,7 @@ func validateLinearSweepOutput(t *testing.T, output []types.LoaderExperiment) {
Name: "test1_ExperimentDuration_20_PostScript_2",
Config: map[string]interface{}{
"WarmupDuration": 10.0,
"OutputPathPrefix": "data/out_ExperimentDuration_20_PostScript_2/test_output_ExperimentDuration_20_PostScript_2",
"OutputPathPrefix": "data/out_ExperimentDuration_20_PostScript_2/test_output",
"ExperimentDuration": 20.0,
},
PostScript: "touch data/out/scripts/test_postscript_2",
Expand Down

0 comments on commit 3190451

Please sign in to comment.