-
Notifications
You must be signed in to change notification settings - Fork 155
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
[BUG]: NemoLLM error with NGC_API_KEY #2153
Comments
Hi @aadesoba-nv! Thanks for submitting this issue - our team has been notified and we'll get back to you as soon as we can! |
We need to determine if this is a bug in NemoLLM by reproducing this outside of Morpheus, and thus reporting it to the NemoLLM team, or if it is a Morpheus issue. |
This appears to be an issue with running import asyncio
import os
import nemollm
def test(nemo_key: str, model: str, prompt: str):
try:
con = nemollm.NemoLLM(api_key=nemo_key)
response = con.generate(model, prompt)
print(f"Success: {response['text']}")
except Exception as e:
print(f"Failure: {e}")
async def test_async(nemo_key: str, model: str, prompt: str):
con = nemollm.NemoLLM(api_key=nemo_key)
fut = await asyncio.wrap_future(con.generate(model, prompt, return_type="async"))
response = nemollm.NemoLLM.post_process_generate_response(fut, return_text_completion_only=False)
print(response)
async def main():
model = "gpt-43b-002"
prompt="What is the minimum nvidia driver version needed for CUDA 12.5?"
print("Test with real key")
nemo_key = os.environ['NGC_API_KEY']
await test_async(nemo_key, model, prompt)
print("\n----------\n")
print("Test with a bad key")
await test_async("bad_key", model, prompt)
print("\n----------\n")
print("Test with a bad key one character off from a real key")
await test_async(nemo_key[0:-1] + '5', model, prompt)
if __name__ == '__main__':
asyncio.run(main()) Output:
|
Version
25.02
Which installation method(s) does this occur on?
Docker
Describe the bug.
When you set NGC_API_KEY=XYZ, you get a reasonable error message, but if this is changed to the real key by one digit then we get that unhelpful error, not sure if its a Morpheus or a NemoLLM bug.
Minimum reproducible example
Relevant log output
Similar log output:
Full env printout
Click here to see environment details
Other/Misc.
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: