Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/eval-dev-quality/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ type EvaluationConfiguration struct {
Models ModelsConfiguration
// Repositories holds repository configuration data.
Repositories RepositoryConfiguration

// APIRequestAttempts holds the number of API request attempts.
APIRequestAttempts int
}

// ModelsConfiguration holds model data of how an evaluation was configured.
Expand Down
2 changes: 2 additions & 0 deletions cmd/eval-dev-quality/cmd/evaluate.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func (command *Evaluate) Initialize(args []string) (evaluationContext *evaluate.

command.ModelIDsWithProviderAndAttributes = configuration.Models.Selected
command.Repositories = configuration.Repositories.Selected
command.APIRequestAttempts = uint(configuration.APIRequestAttempts)
}

// Check and validate common options.
Expand Down Expand Up @@ -173,6 +174,7 @@ func (command *Evaluate) Initialize(args []string) (evaluationContext *evaluate.
}
evaluationContext.APIReqestAttempts = command.APIRequestAttempts
evaluationContext.APIRequestTimeout = command.APIRequestTimeout
evaluationConfiguration.APIRequestAttempts = int(command.APIRequestAttempts)

if command.ExecutionTimeout == 0 {
command.logger.Panicf("execution timeout for compilation and tests must be greater than zero")
Expand Down
3 changes: 2 additions & 1 deletion cmd/eval-dev-quality/cmd/evaluate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,8 @@ func TestEvaluateInitialize(t *testing.T) {
"golang/plain",
"java/plain"
]
}
},
"APIRequestAttempts": 1
}
`)
require.NoError(t, os.WriteFile(filepath.Join(workingDirectory, "config.json"), []byte(configurationContent), 0700))
Expand Down
Loading