Skip to content

Commit

Permalink
remove unused code and tsignore
Browse files Browse the repository at this point in the history
  • Loading branch information
yomybaby committed Sep 9, 2024
1 parent d021172 commit 7b4e8e9
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions react/src/hooks/useResourceLimitAndRemaining.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,6 @@ export const useResourceLimitAndRemaining = ({
// iSizeToSize(resourceGroupResourceSize?.mem + '', 'g')?.number,
]) + 'g',
},
// shmem:
// resourceSlots?.mem === undefined
// ? undefined
// : {
// min: _.max([
// _.find(currentImage?.resource_limits, (i) => i?.key === 'shmem')
// ?.min,
// '64m',
// ]),
// },
accelerators: _.reduce(
acceleratorSlots,
(result, value, key) => {
Expand Down Expand Up @@ -323,12 +313,15 @@ export const useResourceLimitAndRemaining = ({
(result, value, key) => {
result[key] =
_.min([
// @ts-ignore
_.toNumber(checkPresetInfo?.keypair_remaining[key]),
// @ts-ignore
_.toNumber(checkPresetInfo?.group_remaining[key]),
// @ts-ignore
_.toNumber(checkPresetInfo?.scaling_group_remaining[key]),
_.toNumber(
checkPresetInfo?.keypair_remaining[key as ResourceSlotName],
),
_.toNumber(
checkPresetInfo?.group_remaining[key as ResourceSlotName],
),
_.toNumber(
checkPresetInfo?.scaling_group_remaining[key as ResourceSlotName],
),
]) ?? Number.MAX_SAFE_INTEGER;
return result;
},
Expand Down

0 comments on commit 7b4e8e9

Please sign in to comment.