(namespace, repoName, folder string, repoType types.RepositoryType, gsTree func(ctx context.Context, req gitserver.GetRepoInfoByPathReq) ([]*types.File, error))
| 605 | } |
| 606 | |
| 607 | func getFilePaths(namespace, repoName, folder string, repoType types.RepositoryType, gsTree func(ctx context.Context, req gitserver.GetRepoInfoByPathReq) ([]*types.File, error)) ([]string, error) { |
| 608 | var filePaths []string |
| 609 | allFiles, err := getAllFiles(namespace, repoName, folder, repoType, gsTree) |
| 610 | if err != nil { |
| 611 | return nil, err |
| 612 | } |
| 613 | for _, f := range allFiles { |
| 614 | filePaths = append(filePaths, f.Path) |
| 615 | } |
| 616 | |
| 617 | return filePaths, nil |
| 618 | } |
| 619 | |
| 620 | func (c *ModelComponent) Predict(ctx context.Context, req *types.ModelPredictReq) (*types.ModelPredictResp, error) { |
| 621 | mid := inference.ModelID{ |
no test coverage detected