Skip to content

Fix OpenAI deprecated - #52

Open
WahadMasriDev wants to merge 14 commits into
mainfrom
fix_openai_deprecated
Open

Fix OpenAI deprecated#52
WahadMasriDev wants to merge 14 commits into
mainfrom
fix_openai_deprecated

Conversation

@WahadMasriDev

Copy link
Copy Markdown
Collaborator

in order to make openai work some updates need to be done including changing the imports and changing how we deal with the openai library.

Comment thread log/.gitkeep
Comment thread measurement_summary_draw_heatmap.py Outdated
intermediate_result = json.load(f)

with open(file_path + '/%s_dataset_%s_%s_%s/intermediate_result_among5.json' % (experiment, 'HumanEval', model, temperature), 'r') as fo:
with open(file_path + '/%s_dataset_%s_%s_%s/intermediate_result_among5.json' % (experiment, dataset, model, temperature), 'r') as fo:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure this is correct? And why?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had an error associated with this change so i let the path search for the dataset that is specified instead of it being hardcoded.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct. Refer to my comment in the other PR

Comment thread .gitignore

@jie-jw-wu jie-jw-wu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you tested this PR and added the test screenshot to the PR description?

Comment thread generate_response.py Outdated
# no clarifying questions being generated through the prompt
print("Running Designer")
test_cases = designer_main(model, "python", responses, openai.api_key, task_id)
test_cases = designer_main(model, "python", responses, os.environ.get('OPENAI_API_KEY') or os.environ.get('OPENAI_KEY'), task_id)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to wrap os.environ.get('OPENAI_API_KEY') or os.environ.get('OPENAI_KEY') into a util function?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure yes I will do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants