runhouse: RuntimeError when setting up self hosted model + langchain integration

Im having this bug when trying to setup a model within a lambda cloud running SelfHostedHuggingFaceLLM() after the rh.cluster() function.

` from langchain.llms import SelfHostedPipeline, SelfHostedHuggingFaceLLM from langchain import PromptTemplate, LLMChain import runhouse as rh gpu = rh.cluster(name=“rh-a10”, instance_type=“A10:1”).save() template = “”"Question: {question}

Answer: Let’s think step by step.“”"

prompt = PromptTemplate(template=template, input_variables=[“question”]) llm = SelfHostedHuggingFaceLLM(model_id=“gpt2”, hardware=gpu, model_reqs=[“pip:./”, “transformers”, “torch”]) `

image

I made sure with sky check that the lambda credentials are set, but the error i get within the log is this, which i havent been able to solve.

image

If i can get any help solving this i would appreciate it.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 28 (14 by maintainers)

Most upvoted comments

Perfect, thank you. I’ll report this to Ray, it looks like a bug. The requested resources are clearly less than the available resources, so I’m not sure why Ray is blocking. I’ve run your code and it worked for me (also on Lambda): image