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

pdarts implementation (export is not included) #1730

Merged
merged 25 commits into from
Nov 14, 2019

Conversation

squirrelsc
Copy link
Member

No description provided.

@@ -109,11 +112,12 @@ def forward(self, optional_inputs, semantic_labels=None):
"Length of the input list must be equal to number of candidates."
if semantic_labels is None:
semantic_labels = ["default_label"] * self.n_candidates
out, mask = self.mutator.on_forward(self, optional_inputs, semantic_labels)
out, mask = self.mutator.on_forward(
self, optional_inputs, semantic_labels)
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Member Author

Choose a reason for hiding this comment

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

Auto format. We can use same tool (vs code?), or have the same line width setting.

Copy link
Contributor

Choose a reason for hiding this comment

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

You might need to set line width to 140, which is defined in our pylint.

def __repr__(self):
return "{} ({})".format(self.name, self.key)
# def __repr__(self):
# return "{} ({})".format(self.name, self.key)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you do a better repr instead of delete it?

Copy link
Member Author

Choose a reason for hiding this comment

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

the default repr is good enough, it's easy to compare with original network structure.
If we want some additional information, it can be another side method.

Copy link
Contributor

Choose a reason for hiding this comment

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

Then delete it instead of commenting.

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

from torch import nn as nn


class RankedModule(nn.Module):
Copy link
Contributor

Choose a reason for hiding this comment

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

What is RankedModule?

Copy link
Member Author

Choose a reason for hiding this comment

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

like cell, it marks difference rank/level of group. for example, in darts, cell is rank=1, and ops can be treat like rank=2. It can support macro/micro pattern better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this rank/level used?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought to update on existing network for pdarts implementation, so added it. But finally, to get exact implementation, the pdarts recreate network each time. So it's not used in this time, but I believe it's a good mark for future implementation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks "over-engineering" to me. I'm fine with it. Just make everything clear in the docstring. :)

@rabbit008 rabbit008 mentioned this pull request Nov 13, 2019
53 tasks
@squirrelsc squirrelsc merged commit d1d10de into microsoft:dev-nas-refactor Nov 14, 2019
@squirrelsc squirrelsc deleted the pdarts branch November 18, 2019 08:39
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.

3 participants