Skip to content

Commit

Permalink
ignore missing config for dataset details (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult authored Oct 16, 2024
1 parent 6b66f12 commit 0eecd15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions iceprod/website/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,14 @@ async def get(self, dataset_id):
tasks = await self.rest_client.request('GET','/datasets/{}/task_counts/status'.format(dataset_id))
task_info = await self.rest_client.request('GET','/datasets/{}/task_counts/name_status'.format(dataset_id))
task_stats = await self.rest_client.request('GET','/datasets/{}/task_stats'.format(dataset_id))
config = await self.rest_client.request('GET','/config/{}'.format(dataset_id))
try:
config = await self.rest_client.request('GET','/config/{}'.format(dataset_id))
except Exception:
config = {}
for t in task_info:
logger.info('task_info[%s] = %r', t, task_info[t])
type_ = 'UNK'
for task in config['tasks']:
for task in config.get('tasks', []):
if 'name' in task and task['name'] == t:
type_ = 'GPU' if 'requirements' in task and 'gpu' in task['requirements'] and task['requirements']['gpu'] else 'CPU'
break
Expand Down

0 comments on commit 0eecd15

Please sign in to comment.