I am getting I am trying to run the notebook in the “Why finetune” section of the course.
Any idea on how I can resolve this?
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
File ~/opt/anaconda3/lib/python3.9/site-packages/llama/program/util/run_ai.py:134, in powerml_send_query_to_url(params, route)
131 response = requests.post(
132 url=url + route, headers=headers, json=params, timeout=200
133 )
--> 134 response.raise_for_status()
135 except requests.exceptions.Timeout:
File ~/opt/anaconda3/lib/python3.9/site-packages/requests/models.py:1021, in Response.raise_for_status(self)
1020 if http_error_msg:
-> 1021 raise HTTPError(http_error_msg, response=self)
HTTPError: 401 Client Error: Unauthorized for url: https://api.powerml.co/v1/llama/run_program
During handling of the above exception, another exception occurred:
AuthenticationError Traceback (most recent call last)
Cell In[17], line 1
----> 1 non_finetuned_output = non_finetuned("Tell me how to train my dog to sit")
File ~/opt/anaconda3/lib/python3.9/site-packages/llama/runners/basic_model_runner.py:50, in BasicModelRunner.__call__(self, inputs)
47 else:
48 # Singleton
49 input_objects = Input(input=inputs)
---> 50 output_objects = self.llm(
51 input=input_objects,
52 output_type=Output,
53 model_name=self.model_name,
54 enable_peft=self.enable_peft,
55 )
56 if isinstance(output_objects, list):
57 outputs = [o.output for o in output_objects]
File ~/opt/anaconda3/lib/python3.9/site-packages/llama/program/builder.py:85, in Builder.__call__(self, input, output_type, *args, **kwargs)
83 else:
84 value = self.add_model(input, output_type, *args, **kwargs)
---> 85 result = gen_value(value)
86 return result
File ~/opt/anaconda3/lib/python3.9/site-packages/llama/program/util/api_actions.py:203, in gen_value(value)
202 def gen_value(value: Value):
--> 203 value._compute_value()
204 return value._data
File ~/opt/anaconda3/lib/python3.9/site-packages/llama/program/value.py:65, in Value._compute_value(self)
60 else:
61 params = {
62 "program": self._function.program.to_dict(),
63 "requested_values": [self._index],
64 }
---> 65 response = query_run_program(params)
67 response.raise_for_status()
69 # update the cache
File ~/opt/anaconda3/lib/python3.9/site-packages/llama/program/util/run_ai.py:11, in query_run_program(params)
10 def query_run_program(params):
---> 11 resp = powerml_send_query_to_url(params, "/v1/llama/run_program")
12 return resp
File ~/opt/anaconda3/lib/python3.9/site-packages/llama/program/util/run_ai.py:159, in powerml_send_query_to_url(params, route)
157 except Exception:
158 json_response = {}
--> 159 raise llama.error.AuthenticationError(
160 json_response.get("detail", "AuthenticationError")
161 )
162 if response.status_code == 400:
163 try:
AuthenticationError: Invalid token