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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/spf13/cobra v1.10.1
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.11.1
github.com/tensorleap/helm-charts v0.10.4
github.com/tensorleap/helm-charts v0.10.5
github.com/tensorleap/leap-cli/pkg/tensorleapapi v0.0.0-00010101000000-000000000000
google.golang.org/api v0.256.0
gopkg.in/yaml.v3 v3.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tensorleap/helm-charts v0.10.4 h1:G9pcDuFCvAhWTYLg6n3+NyYWUmO+e+rv5k5zYrb5i+4=
github.com/tensorleap/helm-charts v0.10.4/go.mod h1:btxOnI4CfbZ+7gVfN7T0i3DKy4H80HnkJB5EAULuRHs=
github.com/tensorleap/helm-charts v0.10.5 h1:xVT84XYW8Aa/HFf+/dkjgDe+nHFr9gUNziMgrRL+Z40=
github.com/tensorleap/helm-charts v0.10.5/go.mod h1:btxOnI4CfbZ+7gVfN7T0i3DKy4H80HnkJB5EAULuRHs=
github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c=
github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw=
github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts=
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ func StepsFromJob(job *tensorleapapi.Job) []log.Step {
return log.StepStatusDone
case tensorleapapi.STATUSENUM_FAILED:
return log.StepStatusFailed
case tensorleapapi.STATUSENUM_SKIPPED:
return log.StepStatusSkipped
default:
return log.StepStatusWaiting
}
Expand Down
11 changes: 9 additions & 2 deletions pkg/api/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,16 @@ func WaitForConditionWithSteps(ctx context.Context, condition func() (bool, []lo
return ErrorTimeout
}

// Terminal-success step statuses — work is done or was intentionally
// skipped. Treated equivalently when deciding whether the run is over
// or where to mark the failure when one occurs.
func isStepStatusSucceeded(status log.StepStatus) bool {
return status == log.StepStatusDone || status == log.StepStatusSkipped
}

func markLastStepAsFailed(steps []log.Step) {
for _, step := range steps {
if step.Status != log.StepStatusDone {
if !isStepStatusSucceeded(step.Status) {
step.Status = log.StepStatusFailed
break
}
Expand All @@ -124,7 +131,7 @@ func markLastStepAsFailed(steps []log.Step) {

func isAllStepsEnded(steps []log.Step) bool {
for _, step := range steps {
if step.Status != log.StepStatusDone && step.Status != log.StepStatusFailed {
if !isStepStatusSucceeded(step.Status) && step.Status != log.StepStatusFailed {
return false
}
}
Expand Down
6 changes: 6 additions & 0 deletions pkg/log/log_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ const (
StepStatusRunning StepStatus = "RUNNING"
StepStatusPending StepStatus = "PENDING"
StepStatusWaiting StepStatus = "WAITING"
// Step's work wasn't needed for this run (engine marks events SKIPPED
// when the caller didn't request a given step or its inputs are
// unchanged). Terminal status, treat alongside DONE.
StepStatusSkipped StepStatus = "SKIPPED"
)

func diffIcon(status StepStatus) string {
Expand All @@ -258,6 +262,8 @@ func diffIcon(status StepStatus) string {
return text.FgRed.Sprint("✖")
case StepStatusRunning:
return text.FgHiBlue.Sprint("▶")
case StepStatusSkipped:
return text.FgCyan.Sprint("—")
default:
return text.FgHiBlack.Sprint("•")
}
Expand Down
10 changes: 8 additions & 2 deletions pkg/tensorleapapi/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ docs/DatasetBalancing.md
docs/DatasetBalancingJobParams.md
docs/DatasetBalancingResponse.md
docs/DefaultAPI.md
docs/DeleteContainerLabelParams.md
docs/DeleteDashboardParams.md
docs/DeleteDatasetBalancingParams.md
docs/DeleteGeneratedLabelParams.md
Expand Down Expand Up @@ -174,6 +175,8 @@ docs/GetCollectionSamplesMetadataResponse.md
docs/GetColorSupplierDataResponse.md
docs/GetConfusionMatrixLabels.md
docs/GetConfusionMatrixResultCombinationsParams.md
docs/GetContainerLabelsParams.md
docs/GetContainerLabelsResponse.md
docs/GetCurrentProjectVersionParams.md
docs/GetCurrentProjectVersionResponse.md
docs/GetDashboardParams.md
Expand Down Expand Up @@ -424,6 +427,7 @@ docs/SessionTestResultSuccess.md
docs/SetActiveVersionParams.md
docs/SetActiveVersionResponse.md
docs/SetCodeChallengeRequest.md
docs/SetContainerLabelParams.md
docs/SetDefaultTeamRequest.md
docs/SetExperimentPropertiesRequest.md
docs/SetSettingValueWrapper.md
Expand All @@ -437,7 +441,6 @@ docs/SettingsAndValuesWrapper.md
docs/SettingsCategory.md
docs/SeverityMetricElement.md
docs/SingleUserModeSettings.md
docs/SizedLayout.md
docs/SlimTeam.md
docs/SlimUserData.md
docs/SlimUserDataLocal.md
Expand Down Expand Up @@ -603,6 +606,7 @@ model_data_type_enum.go
model_dataset_balancing.go
model_dataset_balancing_job_params.go
model_dataset_balancing_response.go
model_delete_container_label_params.go
model_delete_dashboard_params.go
model_delete_dataset_balancing_params.go
model_delete_generated_label_params.go
Expand Down Expand Up @@ -682,6 +686,8 @@ model_get_collection_samples_metadata_response.go
model_get_color_supplier_data_response.go
model_get_confusion_matrix_labels.go
model_get_confusion_matrix_result_combinations_params.go
model_get_container_labels_params.go
model_get_container_labels_response.go
model_get_current_project_version_params.go
model_get_current_project_version_response.go
model_get_dashboard_params.go
Expand Down Expand Up @@ -932,6 +938,7 @@ model_session_test_result_success.go
model_set_active_version_params.go
model_set_active_version_response.go
model_set_code_challenge_request.go
model_set_container_label_params.go
model_set_default_team_request.go
model_set_experiment_properties_request.go
model_set_setting_value_wrapper.go
Expand All @@ -945,7 +952,6 @@ model_settings_and_values_wrapper.go
model_settings_category.go
model_severity_metric_element.go
model_single_user_mode_settings.go
model_sized_layout.go
model_slim_team.go
model_slim_user_data.go
model_slim_user_data_local.go
Expand Down
10 changes: 8 additions & 2 deletions pkg/tensorleapapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 11.0.85
- API version: 11.0.90
- Package version: 1.0.0
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Expand Down Expand Up @@ -95,6 +95,7 @@ Class | Method | HTTP request | Description
*DefaultAPI* | [**CreateSessionTest**](docs/DefaultAPI.md#createsessiontest) | **Post** /sessions-tests/createSessionTest |
*DefaultAPI* | [**CreateStreamingSamplesVisJob**](docs/DefaultAPI.md#createstreamingsamplesvisjob) | **Post** /sample-collection/createStreamingSamplesVisJob |
*DefaultAPI* | [**CreateTeam**](docs/DefaultAPI.md#createteam) | **Post** /teams/createTeam |
*DefaultAPI* | [**DeleteContainerLabel**](docs/DefaultAPI.md#deletecontainerlabel) | **Post** /insightContainerLabels/deleteContainerLabel |
*DefaultAPI* | [**DeleteDashboard**](docs/DefaultAPI.md#deletedashboard) | **Post** /dashboards/deleteDashboard |
*DefaultAPI* | [**DeleteDatasetBalancing**](docs/DefaultAPI.md#deletedatasetbalancing) | **Post** /datasetcuration/deleteDatasetBalancing |
*DefaultAPI* | [**DeleteGeneratedLabel**](docs/DefaultAPI.md#deletegeneratedlabel) | **Post** /datasetcuration/deleteGeneratedLabel |
Expand Down Expand Up @@ -134,6 +135,7 @@ Class | Method | HTTP request | Description
*DefaultAPI* | [**GetConfusionMatrixResultCombinations**](docs/DefaultAPI.md#getconfusionmatrixresultcombinations) | **Post** /sessionmetrics/getConfusionMatrixResultCombinations |
*DefaultAPI* | [**GetConfusionMatrixTable**](docs/DefaultAPI.md#getconfusionmatrixtable) | **Post** /sessionmetrics/getConfusionMatrixTable |
*DefaultAPI* | [**GetConfusionMetricNames**](docs/DefaultAPI.md#getconfusionmetricnames) | **Post** /sessionmetrics/getConfusionMetricNames |
*DefaultAPI* | [**GetContainerLabels**](docs/DefaultAPI.md#getcontainerlabels) | **Post** /insightContainerLabels/getContainerLabels |
*DefaultAPI* | [**GetCurrentProjectVersion**](docs/DefaultAPI.md#getcurrentprojectversion) | **Post** /projects/getCurrentProjectVersion |
*DefaultAPI* | [**GetDashboard**](docs/DefaultAPI.md#getdashboard) | **Post** /dashboards/getDashboard |
*DefaultAPI* | [**GetDashletFields**](docs/DefaultAPI.md#getdashletfields) | **Post** /dashboards/getDashletFields |
Expand Down Expand Up @@ -222,6 +224,7 @@ Class | Method | HTTP request | Description
*DefaultAPI* | [**SendUserMessage**](docs/DefaultAPI.md#sendusermessage) | **Post** /users/sendUserMessage |
*DefaultAPI* | [**SetActiveVersion**](docs/DefaultAPI.md#setactiveversion) | **Post** /versions/setActiveVersion |
*DefaultAPI* | [**SetCodeChallenge**](docs/DefaultAPI.md#setcodechallenge) | **Post** /auth/setCodeChallenge |
*DefaultAPI* | [**SetContainerLabel**](docs/DefaultAPI.md#setcontainerlabel) | **Post** /insightContainerLabels/setContainerLabel |
*DefaultAPI* | [**SetDefaultTeam**](docs/DefaultAPI.md#setdefaultteam) | **Post** /teams/setDefaultTeam |
*DefaultAPI* | [**SetExperimentProperties**](docs/DefaultAPI.md#setexperimentproperties) | **Post** /versions/setExperimentProperties |
*DefaultAPI* | [**SetMachineType**](docs/DefaultAPI.md#setmachinetype) | **Post** /teams/setMachineType |
Expand Down Expand Up @@ -344,6 +347,7 @@ Class | Method | HTTP request | Description
- [DatasetBalancing](docs/DatasetBalancing.md)
- [DatasetBalancingJobParams](docs/DatasetBalancingJobParams.md)
- [DatasetBalancingResponse](docs/DatasetBalancingResponse.md)
- [DeleteContainerLabelParams](docs/DeleteContainerLabelParams.md)
- [DeleteDashboardParams](docs/DeleteDashboardParams.md)
- [DeleteDatasetBalancingParams](docs/DeleteDatasetBalancingParams.md)
- [DeleteGeneratedLabelParams](docs/DeleteGeneratedLabelParams.md)
Expand Down Expand Up @@ -423,6 +427,8 @@ Class | Method | HTTP request | Description
- [GetColorSupplierDataResponse](docs/GetColorSupplierDataResponse.md)
- [GetConfusionMatrixLabels](docs/GetConfusionMatrixLabels.md)
- [GetConfusionMatrixResultCombinationsParams](docs/GetConfusionMatrixResultCombinationsParams.md)
- [GetContainerLabelsParams](docs/GetContainerLabelsParams.md)
- [GetContainerLabelsResponse](docs/GetContainerLabelsResponse.md)
- [GetCurrentProjectVersionParams](docs/GetCurrentProjectVersionParams.md)
- [GetCurrentProjectVersionResponse](docs/GetCurrentProjectVersionResponse.md)
- [GetDashboardParams](docs/GetDashboardParams.md)
Expand Down Expand Up @@ -673,6 +679,7 @@ Class | Method | HTTP request | Description
- [SetActiveVersionParams](docs/SetActiveVersionParams.md)
- [SetActiveVersionResponse](docs/SetActiveVersionResponse.md)
- [SetCodeChallengeRequest](docs/SetCodeChallengeRequest.md)
- [SetContainerLabelParams](docs/SetContainerLabelParams.md)
- [SetDefaultTeamRequest](docs/SetDefaultTeamRequest.md)
- [SetExperimentPropertiesRequest](docs/SetExperimentPropertiesRequest.md)
- [SetSettingValueWrapper](docs/SetSettingValueWrapper.md)
Expand All @@ -686,7 +693,6 @@ Class | Method | HTTP request | Description
- [SettingsCategory](docs/SettingsCategory.md)
- [SeverityMetricElement](docs/SeverityMetricElement.md)
- [SingleUserModeSettings](docs/SingleUserModeSettings.md)
- [SizedLayout](docs/SizedLayout.md)
- [SlimTeam](docs/SlimTeam.md)
- [SlimUserData](docs/SlimUserData.md)
- [SlimUserDataLocal](docs/SlimUserDataLocal.md)
Expand Down
Loading
Loading