Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix_assert_model_version #325

Merged

Conversation

venkatram-dev
Copy link
Contributor

Description

Please include a summary of the change and which issue is fixed or implemented. Please also include relevant motivation and context (e.g. links, docs, tickets etc.).

Fixes this issue
#314

Steps to reproduce

From the UI, Created a new project, new version with sample dataset, created version.

Ran the training code.

workspace = rf.workspace()

project = workspace.project('test2-forest-fire-detection')

version = project.version(6)

print ('version',version)

version.train()

Getting error

Traceback (most recent call last):
  File "/Users/venkat/Documents/robo_python_trial/r_train.py", line 13, in <module>
    version.train()
  File "/Users/venkat/Documents/robo_python_trial/rvenv/lib/python3.12/site-packages/roboflow/core/version.py", line 450, in train
    assert self.model
           ^^^^^^^^^^
AssertionError

List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How has this change been tested, please provide a testcase or example of how you tested the change?

Tested in my local

Any specific deployment considerations

For example, documentation changes, usability, usage/costs, secrets, etc.

Docs

  • Docs updated? What were the changes:

@venkatram-dev
Copy link
Contributor Author

@grzegorz-roboflow , please review

roboflow/core/version.py Outdated Show resolved Hide resolved
@grzegorz-roboflow
Copy link
Contributor

@venkatram-dev , thanks for addressing comments! I left one minor note. I will approve since the change makes sense to me, but since I'm not the main contributor it would be nice if either @probicheaux , @SolomonLake , @tonylampada or @iurisilvio would also approve :)

@iurisilvio
Copy link
Contributor

@SolomonLake did changes related to has_model in #330. He probably has more context about this issue too.

roboflow/core/version.py Outdated Show resolved Hide resolved
Copy link
Contributor

@SolomonLake SolomonLake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

A future improvement would pulling this duplicated code w/ init into a shared method that loads a model based on type.

@grzegorz-roboflow
Copy link
Contributor

Thank you for your contribution @venkatram-dev, and above all thank you for your patience!

@grzegorz-roboflow grzegorz-roboflow merged commit a823346 into roboflow:main Oct 3, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants