Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Fixed typo on line 75 of nni/nas/pytorch/mutables.py #3538

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

ankitaggarwal23
Copy link
Contributor

@ankitaggarwal23 ankitaggarwal23 commented Apr 15, 2021

Description

This Pull Request fixes a typo on line 75 of nni/nas/pytorch/mutables.py.

While I was reading the source code, I wondered whether this is a typo, as shown below:

nni/nas/pytorch/mutables.py, line 75

@property
71    def name(self):
72        """
73        After the search space is parsed, it will be the module name of the mutable.
74        """
75        return self._name if hasattr(self, "_name") else "_key"

Should "_key" be self._key because this method is supposed to return a key/name of a mutable?

The Issue seems to be very minor but it improves the readability of the Code and fixes a typo online 75 of nni/nas/pytorch/mutables.pyissue in Python 3 which happens to be a standard.

I'm a First-Time Contributor to Microsoft Open-Source so it would be helpful for me understanding how PR workflow works and help me step up in future contributions as well.

Fixes: #3515

@ultmaster @liuzhe-lz Can you review this PR and let me know?

@Lijiaoa
Copy link
Contributor

Lijiaoa commented Apr 21, 2021

target to v2.2 or master?

@ultmaster ultmaster changed the base branch from master to v2.2 April 21, 2021 04:22
@SparkSnail SparkSnail merged commit 336d671 into microsoft:v2.2 Apr 21, 2021
@ankitaggarwal23 ankitaggarwal23 changed the title Fixed typo on line 75 of nni/nas/pytorch/mutables.py Fixed bug on line 75 of nni/nas/pytorch/mutables.py Apr 21, 2021
@ankitaggarwal23 ankitaggarwal23 changed the title Fixed bug on line 75 of nni/nas/pytorch/mutables.py Fixed typo on line 75 of nni/nas/pytorch/mutables.py Apr 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is this a typo on line 75 of nni/nas/pytorch/mutables.py?
5 participants