Skip to content

Commit

Permalink
Clean up worker comments (#4390)
Browse files Browse the repository at this point in the history
  • Loading branch information
epicfaace authored Mar 1, 2023
1 parent 7f2442c commit 5955017
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions codalab/worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
Codalab Worker
Workers handle communications with the Codalab server. Their main role in Codalab execution
is syncing the job states with the server and passing on job-related commands from the server
to architecture-specific RunManagers that run the jobs. Workers are execution platform antagonistic
but they expect the platform specific RunManagers they use to implement a common interface
to architecture-specific BundleRuntimes that run the jobs. Workers are execution platform agnostic
but they expect the platform specific BundleRuntimes they use to implement a common interface
"""

NOOP = 'noop'
Expand Down Expand Up @@ -318,7 +318,7 @@ async def receive_msg():
while not self.terminate:
try:
await receive_msg()
except asyncio.futures.TimeoutError:
except asyncio.TimeoutError:
pass
except websockets.exceptions.ConnectionClosed:
logger.warning("Websocket connection closed, starting a new one...")
Expand Down Expand Up @@ -625,7 +625,7 @@ def propose_set(resource_set, request_count):
@property
def all_runs(self):
"""
Returns a list of all the runs managed by this RunManager
Returns a list of all the runs managed by this worker
"""
return [
BundleCheckinState(
Expand All @@ -650,7 +650,7 @@ def all_runs(self):
@property
def free_disk_bytes(self):
"""
Available disk space by bytes of this RunManager.
Available disk space by bytes of this worker.
"""
error_msg = "Failed to run command {}".format("df -k" + self.work_dir)
try:
Expand Down Expand Up @@ -681,7 +681,7 @@ def initialize_run(self, bundle, resources):
If not, returns immediately.
Then, checks in with the bundle service and sees if the bundle is still assigned to this worker.
If not, returns immediately.
Otherwise, tell RunManager to create the run.
Otherwise, creates the run.
"""
if self.exit_after_num_runs == self.num_runs:
print(
Expand Down

0 comments on commit 5955017

Please sign in to comment.