https://platform.openai.com/docs/api-reference/fine-tuning/event-object
Its looks like id should look like
ftevent-abc123
But on other examples he looks like ft-event-ddT
https://platform.openai.com/docs/api-reference/fine-tuning/list-events
https://platform.openai.com/docs/api-reference/fine-tuning/event-object
Its looks like id should look like
ftevent-abc123
But on other examples he looks like ft-event-ddT
https://platform.openai.com/docs/api-reference/fine-tuning/list-events
You are wondering if the placeholder version or the more hashlike version is correct?
You can just get the results yourself.
Here is a crude job list grabber, that then lets you pick a job to show its events (both API calls limit return length)
import json
from openai import OpenAI
def main():
client = OpenAI()
# Get the list of fine-tuning jobs
joblist_response = client.fine_tuning.jobs.list(limit=10)
jobs = joblist_response.model_dump()
# Print job details
print(json.dumps(jobs, indent=2))
# Main loop for job selection and event fetching
while True:
print("\nPick a job to show events:")
for index, job in enumerate(jobs['data']):
print(f"[{index + 1}] \"id\": \"{job['id']}\"")
print("[99] EXIT")
choice = input("Enter your choice: ")
if choice.isdigit():
choice = int(choice)
if choice == 99:
break
elif 1 <= choice <= len(jobs['data']):
job_id = jobs['data'][choice - 1]['id']
# Retrieve and print events for the chosen job
events_response = client.fine_tuning.jobs.list_events(
fine_tuning_job_id=job_id,
limit=3
)
events = events_response.model_dump()
print(json.dumps(events, indent=2))
else:
print("Invalid choice, please try again.")
else:
print("Please enter a valid number.")
if __name__ == "__main__":
main()
and you find that event objects in the event list have ID in the form:
"id": "ftevent-Frmmaq9zNRgm9bvER5cZYvYK"