Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove reference to run name for clients and use Table #97

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
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
33 changes: 12 additions & 21 deletions triton-client/src/api/api-triton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
TritonReadset,
TritonRequest,
TritonRequestResponse,
TritonRun,
} from "./api-types"
import {
tritonGet,
Expand All @@ -30,16 +29,16 @@ export async function listProjects() {
}

/**
* Fetch the datasets associated with one or more projects. Specify one or more
* freezeman project ids.
* @param externalProjectIds One or more external project id's
* Fetch the datasets associated with a project.
* @param externalProjectID external project id
* @returns TritonDataset[]
*/
export async function listDatasetsByIds(
datasetIDs: Array<TritonDataset["id"]>,
export async function listDatasetsByExternalProjectID(
externalProjectID: ExternalProjectID,
) {
const idList = datasetIDs.join(",")
return await tritonGet<TritonDataset[]>(`runs-datasets?ids=${idList}`)
return await tritonGet<TritonDataset[]>(
`datasets?external_project_ids=${externalProjectID}`,
)
}

export async function listRequestsByDatasetIds(
Expand All @@ -51,18 +50,11 @@ export async function listRequestsByDatasetIds(
)
}

export async function listRunsForProjects(
externalProjectIds: ExternalProjectID[],
export async function listReadsetsForDatasets(
datasetIDs: Array<TritonDataset["id"]>,
) {
const idList = externalProjectIds.join(",")
return await tritonGet<TritonRun[]>(
`project-runs?external_project_ids=${idList}`,
)
}

export async function listReadsetsForDataset(datasetID: TritonDataset["id"]) {
return await tritonGet<TritonReadset[]>(
`dataset-readsets?dataset_id=${datasetID}`,
`dataset-readsets?dataset_ids=${datasetIDs.join(",")}`,
)
}

Expand Down Expand Up @@ -116,10 +108,9 @@ export async function resetPassword(
export default {
fetchLoginStatus,
listProjects,
listRunsForProjects,
listDatasetsByIds,
listDatasetsByExternalProjectID,
listRequestsByDatasetIds,
listReadsetsForDataset,
listReadsetsForDatasets,
listDatasetFilesForReadset,
createDownloadRequest,
getConstants,
Expand Down
2 changes: 1 addition & 1 deletion triton-client/src/components/ActionDropdown/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ReactElement } from "react"
export interface ActionDropdownProps {
button: ReactElement
actions: {
action: { name: string; actionCall: () => void }
action: { name: string; actionCall: () => Promise<void> }
icon: ReactElement
}[]
}
308 changes: 0 additions & 308 deletions triton-client/src/components/DatasetCard.tsx
samouzegar10 marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

Loading