05_Training_lab_student - Error with "Finetune a model in 3 lines of code using Lamin"

I tried running this in the workbook:
model = BasicModelRunner(“EleutherAI/pythia-410m”)
model.load_data_from_jsonlines(“lamini_docs.jsonl”, input_key=“question”, output_key=“answer”)
model.train(is_public=True)

and I got the following error:
LAMINI CONFIGURATION
{}
LAMINI CONFIGURATION
{}
LAMINI CONFIGURATION
{}
status code: 422

HTTPError Traceback (most recent call last)
File /usr/local/lib/python3.9/site-packages/lamini/api/rest_requests.py:25, in make_web_request(key, url, http_method, json)
24 try:
—> 25 resp.raise_for_status()
26 except requests.exceptions.HTTPError as e:

File /usr/local/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: 422 Client Error: Unprocessable Entity for url: http://jupyter-api-proxy.internal.dlai/rev-proxy/lamini/v1/train

During handling of the above exception, another exception occurred:

UserError Traceback (most recent call last)
Cell In[29], line 3
1 model = BasicModelRunner(“EleutherAI/pythia-410m”)
2 model.load_data_from_jsonlines(“lamini_docs.jsonl”, input_key=“question”, output_key=“answer”)
----> 3 model.train(is_public=True)

File /usr/local/lib/python3.9/site-packages/lamini/runners/base_runner.py:259, in BaseRunner.train(self, limit, is_public, **kwargs)
254 final_status = self.lamini_api.train_and_wait(
255 is_public=is_public,
256 **kwargs,
257 )
258 else:
→ 259 final_status = self.lamini_api.train_and_wait(
260 data,
261 is_public=is_public,
262 **kwargs,
263 )
264 try:
265 self.model_name = final_status[“model_name”]

File /usr/local/lib/python3.9/site-packages/lamini/api/lamini.py:128, in Lamini.train_and_wait(self, data, finetune_args, enable_peft, peft_args, is_public, use_cached_model, **kwargs)
118 def train_and_wait(
119 self,
120 data: Optional[List] = None,
(…)
126 **kwargs,
127 ):
→ 128 job = self.train(
129 data,
130 finetune_args=finetune_args,
131 enable_peft=enable_peft,
132 peft_args=peft_args,
133 is_public=is_public,
134 use_cached_model=use_cached_model,
135 )
137 try:
138 status = self.check_job_status(job[“job_id”])

File /usr/local/lib/python3.9/site-packages/lamini/api/lamini.py:106, in Lamini.train(self, data, finetune_args, enable_peft, peft_args, is_public, use_cached_model)
103 self.upload_data(data)
104 data = None
→ 106 return self.trainer.train(
107 data,
108 self.model_name,
109 self.upload_file_path,
110 finetune_args,
111 enable_peft,
112 peft_args,
113 is_public,
114 use_cached_model,
115 )

File /usr/local/lib/python3.9/site-packages/lamini/api/train.py:54, in Train.train(self, data, model_name, upload_file_path, finetune_args, enable_peft, peft_args, is_public, use_cached_model)
51 req_data[“model_config”] = self.model_config.as_dict()
52 url = self.api_prefix + “train”
—> 54 job = make_web_request(self.api_key, url, “post”, req_data)
55 self.job_id = job[“job_id”]
56 print(
57 f"Training job submitted! Check status of job {self.job_id} here: {self.ui_url}/train/{self.job_id}"
58 )

File /usr/local/lib/python3.9/site-packages/lamini/api/rest_requests.py:59, in make_web_request(key, url, http_method, json)
57 except Exception:
58 json_response = {}
—> 59 raise UserError(json_response.get(“detail”, “UserError”))
60 if resp.status_code == 503:
61 try:

UserError: [{‘loc’: [‘body’, ‘dataset_id’], ‘msg’: ‘field required’, ‘type’: ‘value_error.missing’}]

out = model.evaluate()

It looks like it’s some HTTP error:
HTTPError: 422 Client Error: Unprocessable Entity for url: http://jupyter-api-proxy.internal.dlai/rev-proxy/lamini/v1/train