[typo] fix typo where run_server with blocks with index 0 would cause server.create to NOT start (start=0)

fix-auth-token
justheuristic 2 years ago
parent d5c410bb1f
commit f9b6b67b09

@ -122,12 +122,12 @@ class Server(threading.Thread):
if block_indices is not None: if block_indices is not None:
try: try:
start, end = block_indices.split(":") first_block_index, last_block_index = block_indices.split(":")
start, end = map(int, map(str.strip, (start, end))) first_block_index, last_block_index = map(int, map(str.strip, (first_block_index, last_block_index)))
except Exception as e: except Exception as e:
logger.error(f"Failed to parse --block_indices ({e}), must be start:end (e.g. 0:33)") logger.error(f"Failed to parse --block_indices ({e}), must be start:end (e.g. 0:18)")
raise raise
block_indices = range(start, end) block_indices = range(first_block_index, last_block_index)
else: else:
assert num_blocks is not None assert num_blocks is not None
block_indices = range(num_blocks) # TODO replace with proper load balancing block_indices = range(num_blocks) # TODO replace with proper load balancing

Loading…
Cancel
Save