roboflow-python icon indicating copy to clipboard operation
roboflow-python copied to clipboard

TRAINING: Errors after executing version.train() due to "KeyError: 'box_loss'"

Open HahaBill opened this issue 1 year ago • 1 comments

Hi everyone! I saw that there was a problem after I was done with training. It seems the Roboflow Python package has changed since last year. Previously, model evaluation details were not displayed in the terminal, but now it seems the error occurs before I can see the model evaluation in Roboflow. I suspect the issue might be that a request is being sent before the model evaluation is completed, which could explain why it’s unable to find "box_loss."

When I ran the newly trained model and used prediction, then it worked!

roboflow-python version: 1.1.40 operating system: macOS Monteray (12.7.4) python version: Python 3.10.0

Error

Screenshot 2024-08-19 at 22 57 40

Code:

import roboflow

rf = roboflow.Roboflow(api_key="API_KEY")

workspace = rf.workspace()

another_project = workspace.project('project_id')
new_version = another_project.generate_version({"augmentation": {}, "preprocessing": {}})
version = another_project.version(new_version)
version.train()

HahaBill avatar Aug 19 '24 22:08 HahaBill

Created PR https://github.com/roboflow/roboflow-python/pull/313 . After merging this PR 313, we can work on below issue.

There is one more issue https://github.com/roboflow/roboflow-python/issues/314.

venkatram-dev avatar Aug 20 '24 20:08 venkatram-dev