Skip to content

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

Open
@HahaBill

Description

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()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions