You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the new finetuning API, and the Python script provided I get this issue when requesting the Finetuning progress after it (seemingly successfully) started and gave me an ID:
import os
import base64
import requests
def finetune_progress(
finetune_id,
api_key=None,
):
if api_key is None:
if "BFL_API_KEY" not in os.environ:
raise ValueError(
"Provide your API key via --api_key or an environment variable BFL_API_KEY"
)
api_key = os.environ["BFL_API_KEY"]
url = "https://api.us1.bfl.ai/v1/get_result"
headers = {
"Content-Type": "application/json",
"X-Key": api_key,
}
payload = {
"id": finetune_id,
}
response = requests.get(url, headers=headers, params=payload)
try:
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
raise requests.exceptions.RequestException(
f"Finetune progress failed:\n{str(e)}\n{response.content.decode()}"
)
python finetune.py finetune_progress XXXX
Traceback (most recent call last):
File "XXX\flux-api\finetune.py", line 146, in finetune_progress
response.raise_for_status()
File "XXX\flux-api.venv\lib\site-packages\requests\models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://api.us1.bfl.ai/v1/get_result?id=7781c441-1ef3-4841-9876-d6cad4691a61
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "XXX\flux-api\finetune.py", line 305, in
fire.Fire()
File "XXX\flux-api.venv\lib\site-packages\fire\core.py", line 135, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "XXX\flux-api.venv\lib\site-packages\fire\core.py", line 468, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "XXX\flux-api.venv\lib\site-packages\fire\core.py", line 684, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "XXX\flux-api\finetune.py", line 149, in finetune_progress
raise requests.exceptions.RequestException(
requests.exceptions.RequestException: Finetune progress failed:
500 Server Error: Internal Server Error for url: https://api.us1.bfl.ai/v1/get_result?id=7781c441-1ef3-4841-9876-d6cad4691a61
{"id":"XXXXX-XXXX-XXX-XXXXX-XXXXXX","status":"Error","result":null,"progress":null}
The text was updated successfully, but these errors were encountered:
With the new finetuning API, and the Python script provided I get this issue when requesting the Finetuning progress after it (seemingly successfully) started and gave me an ID:
python finetune.py finetune_progress XXXX
The text was updated successfully, but these errors were encountered: