Skip to content

Commit

Permalink
feat: Add credential environment variables for benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
ADustyOldMuffin committed Aug 8, 2024
1 parent 44a3e60 commit fa9896e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/benchmark_buffer_size/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
mebibyte = 1 << 20
gibibyte = 1 << 30

access_key = os.getenv("S3_ACCESS_KEY")
secret_key = os.getenv("S3_SECRET_KEY")

# Read in model name from command line, or env var, or default to gpt-neo-2.7B
model_name_default = os.getenv("MODEL_NAME") or "EleutherAI/pythia-12b/fp16"
parser = argparse.ArgumentParser(
Expand Down Expand Up @@ -381,6 +384,8 @@ def io_test(
def deserialize_test(
source=http_uri,
s3_endpoint=s3_endpoint,
access_key=access_key,
secret_key=secret_key,
plaid_mode=False,
verify_hash=False,
lazy_load=False,
Expand All @@ -393,6 +398,8 @@ def deserialize_test(
stream = open_stream(
source,
s3_endpoint=s3_endpoint,
s3_access_key_id=access_key,
s3_secret_access_key=secret_key,
buffer_size=buffer_size,
force_http=force_http,
)
Expand Down

0 comments on commit fa9896e

Please sign in to comment.