(self)
| 64 | self._create_run(self.experiment_id) |
| 65 | |
| 66 | def _get_headers(self): |
| 67 | headers = {"Content-Type": "application/json"} |
| 68 | if self.api_key: |
| 69 | # set the x-api-token header |
| 70 | headers["x-api-token"] = self.api_key |
| 71 | elif self.access_token: |
| 72 | headers["Authorization"] = f"Bearer {self.access_token}" |
| 73 | return headers |
| 74 | |
| 75 | def set_access_token(self, token: str): |
| 76 | """This method sets the access token to be used for the API. |
no outgoing calls