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

NAS documents general improvements (v2.8) #4942

Merged
merged 4 commits into from
Jun 20, 2022

Conversation

ultmaster
Copy link
Contributor

Description

Updates some docstrings and add more explanations.

Test Options

  • fast test
  • full test - HPO
  • full test - NAS
  • full test - compression

Checklist

  • test case
  • doc

How to test

N/A

...

# Use a callable returning a model
evaluator.evaluate(Model)
Copy link
Contributor

Choose a reason for hiding this comment

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

this Model is a model space or a regular pytorch model?

with fixed_arch(exported_model):
model = Model()
# Then use evaluator.evaluate
evaluator.evaluate(model)
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to add the note here to tell users that the same evaluator instance should not be used both for training supernet and for evaluating a subnet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the problem is restricted to pytorch-lightning.

Copy link
Contributor

@QuanluZhang QuanluZhang Jun 17, 2022

Choose a reason for hiding this comment

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

ok. BTW, this example implies that the Model cannot have init arguments, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. There is no such implication.

@@ -75,7 +75,14 @@ Starting from v2.8, the usage of one-shot strategies are much alike to multi-tri

import nni.retiarii.strategy as strategy
import nni.retiarii.evaluator.pytorch.lightning as pl
evaluator = pl.Classification(...)
evaluator = pl.Classification(
# Need to use pl.DataLoader instead of torch.utils.data.DataLoader here.
Copy link
Contributor

Choose a reason for hiding this comment

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

might be better to addd one more sentence: users can refer to "serializer" doc if they stick to torch.utils.data.DataLoader

"""
warnings.warn(
'Direct export from RandomOneShot returns an arbitrary architecture. '
'You might want to use the checkpoint in another search.',
Copy link
Contributor

Choose a reason for hiding this comment

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

-> Sampling the best architecture from this well trained supernet is another search process, users can use the supernet's checkpoint to do another search.

baseline_decay : float
Decay factor of baseline. New baseline will be equal to ``baseline_decay * baseline_old + reward * (1 - baseline_decay)``.
Decay factor of reward baseline, which is used to normalize the reward in RL.
At each step, the new ew baseline will be equal to ``baseline_decay * baseline_old + reward * (1 - baseline_decay)``.
Copy link
Contributor

Choose a reason for hiding this comment

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

ew baseline?

@QuanluZhang QuanluZhang merged commit 8978659 into microsoft:master Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants