0

I'm currently taking the DeepAI's Finetuning Coursera course and encountered a bug while trying to run one of their demonstrations locally in a Jupyter notebook.

Environment:

  • Python version: 3.11
  • Required packages:
    • notebook
    • lamini
    • llama-cpp-python (> 0.1.53)

Issue:

When attempting to run the following code:

import os
import lamini

lamini.api_url = os.getenv("POWERML__PRODUCTION__URL")
lamini.api_key = os.getenv("POWERML__PRODUCTION__KEY")

from llama import BasicModelRunner

non_finetuned = BasicModelRunner("meta-llama/Llama-2-7b-hf")

non_finetuned_output = non_finetuned("Tell me how to train my dog to sit")

I receive a TypeError at the last line:

TypeError: can only concatenate str (not "NoneType") to str

This error occurs when I try to pass a string to the non_finetuned BasicModelRunner object.

2 Answers 2

1

I had the same problem. You have to create an account in lamini then you can create a key copy/past to POWERML__PRODUCTION__KEY for POWERML__PRODUCTION__URL let it as empty string ""

Sign up to request clarification or add additional context in comments.

Comments

0

The environment variables POWERML__PRODUCTION__URL and POWERML__PRODUCTION__KEY were not properly set.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.