Skip to content

Commit

Permalink
Fall back, old data
Browse files Browse the repository at this point in the history
  • Loading branch information
bra-fsn committed Jun 3, 2024
1 parent 92a3c6c commit 1577005
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions inspector/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ def servers():
engine = create_engine(f"sqlite:///{path}")

session = Session(engine)
return session.exec(select(
Server.vendor_id,
Server.api_reference,
Server.gpu_count,
Server.memory,
)).all()
return session.exec(select(Server)).all()


@click.group()
Expand Down
6 changes: 3 additions & 3 deletions inspector/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ def should_start(task: Task, data_dir: str | os.PathLike, srv) -> bool:
# skip tasks which require GPUs on a server which doesn't have one
logging.info(f"Skipping task {task.name} because it requires GPU, but gpu_count is {srv.gpu_count}")
return False
# srv.memory is MiB, minimum_memory is GiB
if srv.memory < task.minimum_memory * 1024:
mem_gib = srv.memory / 1024
# srv.memory_amount is MiB, minimum_memory is GiB
if srv.memory_amount < task.minimum_memory * 1024:
mem_gib = srv.memory_amount / 1024
logging.info(f"Skipping task {task.name} because it requires {task.minimum_memory} GiB RAM, but this machine has only {mem_gib:.03}")
return False

Expand Down

0 comments on commit 1577005

Please sign in to comment.