Skip to content

Commit

Permalink
chore: publish trial details page [DET-3843] (#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidzr authored Aug 19, 2020
1 parent d1114f3 commit 4be2c4a
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions webui/elm/src/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,9 @@ updateWithRoute url model =
Just (Route.TrialDetail id) ->
Page.TrialDetail.init id |> mapInit model trialDetailInfo

Just (Route.TrialDetailReact id) ->
( model, Navigation.load (Route.toString (Route.TrialDetailReact id)) )

Just (Route.LogViewer id) ->
Page.LogViewer.init id |> mapInit model logViewerInfo

Expand Down
4 changes: 2 additions & 2 deletions webui/elm/src/Page/ExperimentDetail.elm
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ trialsTableConfig session m =
{ attributes = [ HA.class "p-2" ]
, children =
[ H.a
[ HA.href <| Route.toString (Route.TrialDetail trial.id)
[ HA.href <| Route.toString (Route.TrialDetailReact trial.id)
, Page.Common.onClickStopPropagation NoOp
]
[ H.text <| String.fromInt trial.id ]
Expand All @@ -251,7 +251,7 @@ trialsTableConfig session m =
rowAttrs trial =
[ HA.class "cursor-pointer hover:bg-orange-100"
, HE.on "click"
(D.map (SendOut << Comm.RouteRequested (Route.TrialDetail trial.id))
(D.map (SendOut << Comm.RouteRequested (Route.TrialDetailReact trial.id))
(D.map2 (||) (D.field "ctrlKey" D.bool) (D.field "metaKey" D.bool))
)
]
Expand Down
2 changes: 1 addition & 1 deletion webui/elm/src/Page/TensorBoardList.elm
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ sourceToHtml tableRecord =
"Trials "
)
:: (List.sort trialIds
|> List.map (linkHtml Route.TrialDetail)
|> List.map (linkHtml Route.TrialDetailReact)
|> linksToHtml
)
|> Page.Common.horizontalList
Expand Down
4 changes: 4 additions & 0 deletions webui/elm/src/Route.elm
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ type Route
| TaskList
| TensorBoardList CommandLikeListOptions
| TrialDetail Int
| TrialDetailReact Int
| LogViewer Int


Expand Down Expand Up @@ -316,5 +317,8 @@ toString r =
TrialDetail id ->
absolute [ "ui", "trials", String.fromInt id ] []

TrialDetailReact id ->
absolute [ "det", "trials", String.fromInt id ] []

LogViewer id ->
absolute [ "ui", "logs", "trials", String.fromInt id ] []
2 changes: 1 addition & 1 deletion webui/react/src/components/CheckpointModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const CheckpointModal: React.FC<Props> = ({ config, checkpoint, onHide, show, ti
Experiment {checkpoint.experimentId}
</Link>
<span className={css.sourceDivider} />
<Link path={`/ui/trials/${checkpoint.trialId}`}>Trial {checkpoint.trialId}</Link>
<Link path={`/det/trials/${checkpoint.trialId}`}>Trial {checkpoint.trialId}</Link>
<span className={css.sourceDivider} />
<span>Batch {checkpoint.batch}</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const experimentDetails: ExperimentDetails = {
startTime: Date.now.toString(),
state: RunState.Completed,
totalBatchesProcessed: 10000,
url: '/ui/trials/1',
url: '/det/trials/1',
},
],
username: 'hamid',
Expand Down
2 changes: 1 addition & 1 deletion webui/react/src/pages/TaskList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const TaskList: React.FC = () => {
info.source = record.misc.experimentIds || [];
} else if (record.misc?.trialIds) {
info.label = 'Trial';
info.path = '/ui/trials';
info.path = '/det/trials';
info.source = record.misc.trialIds || [];
}
info.isPlural = info.source.length > 1;
Expand Down
2 changes: 1 addition & 1 deletion webui/react/src/services/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const ioToTrial = (io: ioTypeTrial): TrialItem => {
startTime: io.start_time,
state: io.state as RunState,// TODO add checkpoint decoder
totalBatchesProcessed: io.total_batches_processed || 0,
url: `/ui/trials/${io.id}`,
url: `/det/trials/${io.id}`,
};
};

Expand Down

0 comments on commit 4be2c4a

Please sign in to comment.