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

[Retiarii] support debug mode for easy debuggability #3476

Merged
merged 8 commits into from
Apr 6, 2021

Conversation

QuanluZhang
Copy link
Contributor

@QuanluZhang QuanluZhang commented Mar 25, 2021

  • support local debug mode. This mode only runs one trial locally, specifically, it applies mutators (default to choose the first candidate for the choices) to generate a new model, then run this model locally.
  • make strategy the main thread for easily debugging user customized strategies
  • update doc accordingly

@QuanluZhang QuanluZhang marked this pull request as ready for review March 29, 2021 02:10
@liuzhe-lz
Copy link
Contributor

liuzhe-lz commented Mar 30, 2021

My major concern is that the feature is split into two modules, experiment and strategy, which increases the complexity and in my opinion, is unnecessary.
LocalDebugStrategy IS a strategy, so it seems intuitive to create a normal experiment with that strategy. But that's not the expected way to use it. Similarly, user may set a strategy before invoking experiment.local_debug_run(), and the strategy will be silently ignored.
Since current RetiariiExperiment API hides strategy.run() from end user, my suggestion is to define a "local debug experiment" and put all logic into that class or function. And in case we changed experiment API to let user invoke strategy.run() directly, I would suggest to make debug mode a static method.

@QuanluZhang
Copy link
Contributor Author

QuanluZhang commented Mar 31, 2021

My major concern is that the feature is split into two modules, experiment and strategy, which increases the complexity and in my opinion, is unnecessary.
LocalDebugStrategy IS a strategy, so it seems intuitive to create a normal experiment with that strategy. But that's not the expected way to use it. Similarly, user may set a strategy before invoking experiment.local_debug_run(), and the strategy will be silently ignored.
Since current RetiariiExperiment API hides strategy.run() from end user, my suggestion is to define a "local debug experiment" and put all logic into that class or function. And in case we changed experiment API to let user invoke strategy.run() directly, I would suggest to make debug mode a static method.

good points. To me, the current interface is the most convenient as it only requires changing one line of code. Maybe we have a follow-up pr for this.

@QuanluZhang QuanluZhang merged commit 200a108 into microsoft:master Apr 6, 2021
acured pushed a commit to acured/nni that referenced this pull request Apr 7, 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.

3 participants