Skip to content

Commit

Permalink
prompts -> inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
aspfohl committed Nov 29, 2023
1 parent 6e5e217 commit a776cb0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/inference/endpoint_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def parse_args() -> Namespace:
#####
# Path Parameters
parser.add_argument(
'-p',
'--prompts',
'-i',
'--inputs',
nargs='+',
help=f'List of strings, local datafiles (starting with {utils.PROMPTFILE_PREFIX}),' +\
' and/or remote object stores'
Expand Down Expand Up @@ -114,10 +114,10 @@ async def main(args: Namespace) -> None:
if not api_key:
log.warning(f'API key not set in {ENDPOINT_API_KEY_ENV}')

new_prompts = []
for prompt in args.prompts:
new_inputs = []
for prompt in args.inputs:
if prompt.startswith(utils.PROMPTFILE_PREFIX):
new_prompts.append(prompt)
new_inputs.append(prompt)
continue

input_object_store = maybe_create_object_store_from_uri(prompt)
Expand All @@ -127,9 +127,9 @@ async def main(args: Namespace) -> None:
log.info(f'Downloaded {prompt} to {local_output_path}')
prompt = f'{utils.PROMPTFILE_PREFIX}{local_output_path}'

new_prompts.append(prompt)
new_inputs.append(prompt)

prompt_strings = utils.load_prompts(new_prompts, args.prompt_delimiter)
prompt_strings = utils.load_prompts(new_inputs, args.prompt_delimiter)

cols = ['batch', 'prompt', 'output']
param_data = {
Expand Down

0 comments on commit a776cb0

Please sign in to comment.