diff --git a/README.md b/README.md index 7f26716..ae35f2f 100644 --- a/README.md +++ b/README.md @@ -290,6 +290,8 @@ python main.py \ --upload_url ``` +If you would like to always report your results to an upload_url, even if it's not explicitly provided, you can set it in your environment variables as `SQL_EVAL_UPLOAD_URL` + #### Testing the function locally If you'd like to modify the functions and test it out locally, you can run these sample commands to deploy the function locally and then trigger the openai runner: ```bash diff --git a/main.py b/main.py index 2c66ee2..f101778 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ import argparse +import os if __name__ == "__main__": parser = argparse.ArgumentParser() @@ -36,6 +37,9 @@ f"WARNING: Check that questions_file {args.questions_file} is compatible with db_type {args.db_type}" ) + if args.upload_url is None: + args.upload_url = os.environ.get("SQL_EVAL_UPLOAD_URL") + # check that the list of prompt files has the same length as the list of output files if len(args.prompt_file) != len(args.output_file): raise ValueError(