Skip to content

Commit

Permalink
Fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cjao committed May 28, 2024
1 parent bd8a049 commit 2a2b22f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions covalent/_dispatcher_plugins/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,15 +600,15 @@ def _upload(assets: List[AssetSchema]):
number_uploaded = 0
for i, asset in enumerate(assets):
if not asset.remote_uri or not asset.uri:
app_log.debug(f"Skipping asset {i+1} out of {total}")
app_log.debug(f"Skipping asset {i + 1} out of {total}")
continue
if asset.remote_uri.startswith(local_scheme_prefix):
copy_file_locally(asset.uri, asset.remote_uri)
number_uploaded += 1
else:
_upload_asset(asset.uri, asset.remote_uri)
number_uploaded += 1
app_log.debug(f"Uploaded asset {i+1} out of {total}.")
app_log.debug(f"Uploaded asset {i + 1} out of {total}.")
app_log.debug(f"uploaded {number_uploaded} assets.")


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ def test_insert_lattices_data(test_db, mocker):
lattice_args = get_lattice_kwargs(
dispatch_id=f"dispatch_{i + 1}",
name=f"workflow_{i + 1}",
docstring_filename=f"docstring_{i+1}.txt",
storage_path=f"results/dispatch_{i+1}/",
docstring_filename=f"docstring_{i + 1}.txt",
storage_path=f"results/dispatch_{i + 1}/",
executor="dask",
workflow_executor="dask",
created_at=cur_time,
Expand All @@ -264,10 +264,10 @@ def test_insert_lattices_data(test_db, mocker):
assert lattice.dispatch_id == f"dispatch_{i + 1}"
assert lattice.electron_id is None
assert lattice.name == f"workflow_{i + 1}"
assert lattice.docstring_filename == f"docstring_{i+1}.txt"
assert lattice.docstring_filename == f"docstring_{i + 1}.txt"
assert lattice.status == "RUNNING"
assert lattice.storage_type == STORAGE_TYPE
assert lattice.storage_path == f"results/dispatch_{i+1}/"
assert lattice.storage_path == f"results/dispatch_{i + 1}/"
assert lattice.function_filename == FUNCTION_FILENAME
assert lattice.function_string_filename == FUNCTION_STRING_FILENAME
assert lattice.executor == "dask"
Expand Down
2 changes: 1 addition & 1 deletion tests/stress_tests/scripts/mnist_sublattices.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def test(
correct += (pred.argmax(1) == y).type(torch.float).sum().item()
test_loss /= num_batches
correct /= size
print(f"Test Error: \n Accuracy: {(100*correct):>0.1f}%, Avg loss: {test_loss:>8f} \n")
print(f"Test Error: \n Accuracy: {(100 * correct):>0.1f}%, Avg loss: {test_loss:>8f} \n")


def train_model(
Expand Down
2 changes: 1 addition & 1 deletion tests/stress_tests/scripts/sublattices_mixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def test(
correct += (pred.argmax(1) == y).type(torch.float).sum().item()
test_loss /= num_batches
correct /= size
print(f"Test Error: \n Accuracy: {(100*correct):>0.1f}%, Avg loss: {test_loss:>8f} \n")
print(f"Test Error: \n Accuracy: {(100 * correct): > 0.1f}%, Avg loss: {test_loss: > 8f} \n")


def train_model(
Expand Down
2 changes: 1 addition & 1 deletion tests/stress_tests/scripts/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def test(
correct += (pred.argmax(1) == y).type(torch.float).sum().item()
test_loss /= num_batches
correct /= size
print(f"Test Error: \n Accuracy: {(100*correct):>0.1f}%, Avg loss: {test_loss:>8f} \n")
print(f"Test Error: \n Accuracy: {(100 * correct):>0.1f}%, Avg loss: {test_loss:>8f} \n")


def train_model(
Expand Down

0 comments on commit 2a2b22f

Please sign in to comment.