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 error when default_scope is None #2499

Merged
merged 1 commit into from
Dec 21, 2023
Merged

Conversation

Y-T-G
Copy link
Contributor

@Y-T-G Y-T-G commented Oct 17, 2023

Motivation

Some models don't have any default scope, which means

        if not DefaultScope.check_instance_created(self.experiment_name):
            self.scope = DefaultScope.get_instance(
                self.experiment_name,
                scope_name=self.model_cfg.get('default_scope'))
                )

returns None which causes an error because scope_name should be string.

Modification

Convert to string while retrieving value for scope_name

@CLAassistant
Copy link

CLAassistant commented Oct 17, 2023

CLA assistant check
All committers have signed the CLA.

@RunningLeon
Copy link
Collaborator

@Y-T-G hi, thanks for your PR? could you pose your env and error log when returns None?

Copy link
Collaborator

@RunningLeon RunningLeon left a comment

Choose a reason for hiding this comment

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

LGTM

@RunningLeon RunningLeon merged commit 7079ec2 into open-mmlab:main Dec 21, 2023
25 of 27 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.

3 participants