Skip to content

Commit

Permalink
precommit linting
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhniebergall committed Aug 10, 2023
1 parent 9464008 commit 2a9d554
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 1 addition & 3 deletions elser-speedtest/_support/filter_vocab.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
lines = raw_vocab.readlines()


l2 = ['"'+s.strip()+'"' for s in lines if pattern.match(s)]
l2 = ['"' + s.strip() + '"' for s in lines if pattern.match(s)]

with open("bert_vocab_whole_words.json", "w") as outfile:
outfile.write("[")
outfile.write(",".join(l2))
outfile.write("]")


1 change: 0 additions & 1 deletion elser-speedtest/_support/generate_fixed_length_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
doc = {"body": " ".join(doc_words)}

doc_file.writelines([json.dumps(doc), "\n"])
`
2 changes: 1 addition & 1 deletion elser-speedtest/_support/google-storage-uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# Creates the new bucket
bucket = storage_client.create_bucket(bucket_name)

print(f"Bucket {bucket.name} created.")
print(f"Bucket {bucket.name} created.")
6 changes: 3 additions & 3 deletions elser-speedtest/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def __init__(self, track, params):

async def get_xpack_capabilities(es):
print()
print("="*50)
print("=" * 50)
print(await es.perform_request(method="GET", path="/_xpack"))
print("="*50)
print("=" * 50)


elser_model_id = ".elser_model_1"
Expand Down Expand Up @@ -112,7 +112,7 @@ async def start_trained_model_deployment(es, params):
number_of_allocations=number_of_allocations,
threads_per_allocation=threads_per_allocation,
queue_capacity=queue_capacity,
cache_size="0b"
cache_size="0b",
)
return True
except BadRequestError as bre:
Expand Down

0 comments on commit 2a9d554

Please sign in to comment.