-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up Summarize test #19
Conversation
Signed-off-by: Fayvor Love <[email protected]>
Signed-off-by: Fayvor Love <[email protected]>
@@ -39,7 +39,12 @@ def get_env_var(var_name): | |||
print(f"{var_name} not found in .env file.") | |||
|
|||
if not env_var: | |||
# If neither Colab nor .env file, prompt the user for the API key | |||
# If we can't find a value in the env, use the default value if provided. | |||
if default_value is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a lot of code that could just be handled in one line:
env_var = os.environ.get(var_name, default_value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fayvor Since this is blocking tests passing, let's get this in, and come back to @rawkintrevo's point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rawkintrevo I'm not sure what you are suggesting, sorry. That line doesn't have the same outcome.
@@ -39,7 +39,12 @@ def get_env_var(var_name): | |||
print(f"{var_name} not found in .env file.") | |||
|
|||
if not env_var: | |||
# If neither Colab nor .env file, prompt the user for the API key | |||
# If we can't find a value in the env, use the default value if provided. | |||
if default_value is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fayvor Since this is blocking tests passing, let's get this in, and come back to @rawkintrevo's point
@rawkintrevo @fayvor To look at the utils package closer: #20 |
#149
GRANITE_TESTING
and others.PR Checklist
!pip install git+https://github.com/ibm-granite-community/granite-kitchen
in the instructions.