mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-01-26 16:39:47 +00:00
Fix a bug that can happen if you remove a gpu from your machine.
This commit is contained in:
@@ -102,7 +102,7 @@ export default function JobsTable({ onlyActive = false }: JobsTableProps) {
|
||||
jd['Idle'] = { name: 'Idle', jobs: [] };
|
||||
jobs.forEach(job => {
|
||||
const gpu = gpuList.find(gpu => job.gpu_ids?.split(',').includes(gpu.index.toString())) as GpuInfo;
|
||||
const key = `${gpu.index}`;
|
||||
const key = `${gpu?.index || '0'}`;
|
||||
if (['queued', 'running', 'stopping'].includes(job.status) && key in jd) {
|
||||
jd[key].jobs.push(job);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user