[jira] [Commented] (SINGA-410) Add two function, set_params() and get_params(), for Autograd Layer class

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706757#comment-16706757
 ] 

ASF subversion and git services commented on SINGA-410:
---

Commit 1283441b68ef3cd643e1c10af27da05723ac7bcd in incubator-singa's branch 
refs/heads/master from xuewanqi
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=1283441 ]

SINGA-410 Add two function, set_params() and get_params(), for Autograd Layer 
class

- add these two functions for base layer and Conv2d Layer.
- did some test for these functions, the added functions work well.
- next step is to add these functions for other subclasses of autograd.Layer().


> Add two function, set_params() and get_params(), for Autograd Layer class
> -
>
> Key: SINGA-410
> URL: https://issues.apache.org/jira/browse/SINGA-410
> Project: Singa
>  Issue Type: New Feature
>Reporter: Xue Wanqi
>Priority: Major
>
> Add two function, set_params() and get_params(), for Autograd Layer class. 
> Users can obtain parameters and set parameters by calling these functions. 
> these will be also useful when do checkpoint.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-410) Add two function, set_params() and get_params(), for Autograd Layer class

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706761#comment-16706761
 ] 

ASF subversion and git services commented on SINGA-410:
---

Commit ae8eb7c5f7520b8fe71f44fc06ae8af3b0894eda in incubator-singa's branch 
refs/heads/master from [~flytosky]
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=ae8eb7c ]

Merge pull request #422 from xuewanqi/set_get_params

SINGA-410 Add two function, set_params() and get_params(), for Autograd Layer 
class

> Add two function, set_params() and get_params(), for Autograd Layer class
> -
>
> Key: SINGA-410
> URL: https://issues.apache.org/jira/browse/SINGA-410
> Project: Singa
>  Issue Type: New Feature
>Reporter: Xue Wanqi
>Priority: Major
>
> Add two function, set_params() and get_params(), for Autograd Layer class. 
> Users can obtain parameters and set parameters by calling these functions. 
> these will be also useful when do checkpoint.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-410) Add two function, set_params() and get_params(), for Autograd Layer class

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706758#comment-16706758
 ] 

ASF subversion and git services commented on SINGA-410:
---

Commit 43c6bd60530b54ab272ca32a6540eda3429d50de in incubator-singa's branch 
refs/heads/master from xuewanqi
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=43c6bd6 ]

SINGA-410 Add two function, set_params() and get_params(), for Autograd Layer 
class

- add those two functions for other subclass of Layer.
- add some comments and reformat the codes.


> Add two function, set_params() and get_params(), for Autograd Layer class
> -
>
> Key: SINGA-410
> URL: https://issues.apache.org/jira/browse/SINGA-410
> Project: Singa
>  Issue Type: New Feature
>Reporter: Xue Wanqi
>Priority: Major
>
> Add two function, set_params() and get_params(), for Autograd Layer class. 
> Users can obtain parameters and set parameters by calling these functions. 
> these will be also useful when do checkpoint.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-410) Add two function, set_params() and get_params(), for Autograd Layer class

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706760#comment-16706760
 ] 

ASF subversion and git services commented on SINGA-410:
---

Commit d7383c3eba667f2d713d991bc8cebaf829012be5 in incubator-singa's branch 
refs/heads/master from xuewanqi
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=d7383c3 ]

SINGA-410 Add two function, set_params() and get_params(), for Autograd Layer 
class

- modified code design.


> Add two function, set_params() and get_params(), for Autograd Layer class
> -
>
> Key: SINGA-410
> URL: https://issues.apache.org/jira/browse/SINGA-410
> Project: Singa
>  Issue Type: New Feature
>Reporter: Xue Wanqi
>Priority: Major
>
> Add two function, set_params() and get_params(), for Autograd Layer class. 
> Users can obtain parameters and set parameters by calling these functions. 
> these will be also useful when do checkpoint.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-410) Add two function, set_params() and get_params(), for Autograd Layer class

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706759#comment-16706759
 ] 

ASF subversion and git services commented on SINGA-410:
---

Commit 01224bb907a92327ca0746d1efacce116b6c0172 in incubator-singa's branch 
refs/heads/master from xuewanqi
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=01224bb ]

SINGA-410 Add two function, set_params() and get_params(), for Autograd Layer 
class

- add a member function set_one_param() for Layer to simplified codes.


> Add two function, set_params() and get_params(), for Autograd Layer class
> -
>
> Key: SINGA-410
> URL: https://issues.apache.org/jira/browse/SINGA-410
> Project: Singa
>  Issue Type: New Feature
>Reporter: Xue Wanqi
>Priority: Major
>
> Add two function, set_params() and get_params(), for Autograd Layer class. 
> Users can obtain parameters and set parameters by calling these functions. 
> these will be also useful when do checkpoint.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-411) Local variable 'params' referenced before assignment

2018-12-02 Thread Xue Wanqi (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706740#comment-16706740
 ] 

Xue Wanqi commented on SINGA-411:
-

Hi, Liu Hui,

Currently, the bug should have been fixed.

Please try the latest version.

I can run it without error.

 

> Local variable 'params' referenced before assignment
> 
>
> Key: SINGA-411
> URL: https://issues.apache.org/jira/browse/SINGA-411
> Project: Singa
>  Issue Type: Bug
>Reporter: Liu Hui
>Priority: Major
> Attachments: Screenshot from 2018-11-27 10-18-12.png, Screenshot from 
> 2018-11-30 16-34-05.png
>
>
> I compiled singa(maser:commit 3d688be) from github, then run the 
> exapmles:python train.py vgg cifar-10-batches-py.
> But an error occurred when saved the model.
> The error shows in the attachment.
> Ubuntu 18.04, with kernel 4.15.0-39-generic
> python3.6.7
>  GPU : GeForce GTX 850M
>  dirver : nvidia-396
>  cuda-9.0, cdnn-7.1.4



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-413) Hyper-parameter configuration API

2018-12-02 Thread Ngin Yun Chuan (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706712#comment-16706712
 ] 

Ngin Yun Chuan commented on SINGA-413:
--

Thanks for the feedback. I will add the alternative method of saving knobs to 
our documentation too.

The Hyperparameter class is [btb|https://hdi-project.github.io/BTB]'s 
abstraction of hyperparameters. It is encapsulated from model developers; model 
developers only interact with Rafiki's Knob class. Internally, Rafiki does a 
mapping from Rafiki's Knob class to the implementation-specific Hyperparameter 
class in the advisor component, which currently uses the BTB module for 
generating hyperparameters.

> Hyper-parameter configuration API
> -
>
> Key: SINGA-413
> URL: https://issues.apache.org/jira/browse/SINGA-413
> Project: Singa
>  Issue Type: Improvement
>Reporter: wangwei
>Priority: Major
>
> The current API for hyper-parameter configuration in Rafiki requires the 
> model contributor to implement
> {code:java}
> def get_knob_config(self):
> {
> 'knobs': {
>'hidden_layer_units': {
>'type': 'int',
>'range': [2, 128]
>},
>  ...
>  }
> def init(self, knobs):
> self.hidden_layer_units = knobs.get(hidden_layer_units){code}
> The json style can be replaced by
> {code}
> def check(knobs, val):
>if knobs[0].value() == 4 and val == 4:
>   return False
>else:
>   return True
> def register_knobs(self):
>self.hidden_layer_units = Knob(32, kInt, range=(2, 128))
>self.learning_rate = Knob(0.02, kExpFloat, range=(1e-1, 1e-4))
>self.batch_size = Knob(8, kIntCat, range = [4, 8, 16]))
>self.num_epoch = Knob(4, kIntCat, range = [4, 8, 16], 
> depends=self.batch_size, callback=check()))
> def train(self):
>for i in range(self.num_epoch.value()):
>   ...{code}
> The worker's workflow is like
> {code:java}
> for trial in range(total_trials):
>model = Model()
>model.register_knobs()
>knobs = [x for x, y in model.__dict__.getitems() if isinstance(y, Knob)]
>if trial == 0:
>  reigster_knobs_to_advisor(knobs)
>get_knobs_from_advisor(knobs){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-413) Hyper-parameter configuration API

2018-12-02 Thread wangwei (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706677#comment-16706677
 ] 

wangwei commented on SINGA-413:
---

It looks fine.

What's the difference between Knob class and HyperParameter class?

if you implement the example like this
{code:java}
self.__dict__.update(knobs){code}
Then you can access the knobs like
{code:java}
self._clf = self._build_classifier(
self.max_depth,
self.criterion
){code}

> Hyper-parameter configuration API
> -
>
> Key: SINGA-413
> URL: https://issues.apache.org/jira/browse/SINGA-413
> Project: Singa
>  Issue Type: Improvement
>Reporter: wangwei
>Priority: Major
>
> The current API for hyper-parameter configuration in Rafiki requires the 
> model contributor to implement
> {code:java}
> def get_knob_config(self):
> {
> 'knobs': {
>'hidden_layer_units': {
>'type': 'int',
>'range': [2, 128]
>},
>  ...
>  }
> def init(self, knobs):
> self.hidden_layer_units = knobs.get(hidden_layer_units){code}
> The json style can be replaced by
> {code}
> def check(knobs, val):
>if knobs[0].value() == 4 and val == 4:
>   return False
>else:
>   return True
> def register_knobs(self):
>self.hidden_layer_units = Knob(32, kInt, range=(2, 128))
>self.learning_rate = Knob(0.02, kExpFloat, range=(1e-1, 1e-4))
>self.batch_size = Knob(8, kIntCat, range = [4, 8, 16]))
>self.num_epoch = Knob(4, kIntCat, range = [4, 8, 16], 
> depends=self.batch_size, callback=check()))
> def train(self):
>for i in range(self.num_epoch.value()):
>   ...{code}
> The worker's workflow is like
> {code:java}
> for trial in range(total_trials):
>model = Model()
>model.register_knobs()
>knobs = [x for x, y in model.__dict__.getitems() if isinstance(y, Knob)]
>if trial == 0:
>  reigster_knobs_to_advisor(knobs)
>get_knobs_from_advisor(knobs){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-415) Moving SINGA to Gitbox

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706618#comment-16706618
 ] 

ASF subversion and git services commented on SINGA-415:
---

Commit 12cfe838fb4ff1e738ba059c4209d6221494b4b3 in incubator-singa's branch 
refs/heads/master from [~flytosky]
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=12cfe83 ]

Merge pull request #425 from moazreyad/SINGA-415

SINGA-415 Moving SINGA to Gitbox

> Moving SINGA to Gitbox
> --
>
> Key: SINGA-415
> URL: https://issues.apache.org/jira/browse/SINGA-415
> Project: Singa
>  Issue Type: Task
>Reporter: Moaz Reyad
>Priority: Minor
>
> This issue collects the internal work which is required in SINGA after 
> [moving to GitBox|https://issues.apache.org/jira/browse/INFRA-17328]. 
> Some modifications are required such as updating the [source 
> repository|http://singa.apache.org/en/community/source-repository.html] page 
> in the website.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-415) Moving SINGA to Gitbox

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706619#comment-16706619
 ] 

ASF subversion and git services commented on SINGA-415:
---

Commit 12cfe838fb4ff1e738ba059c4209d6221494b4b3 in incubator-singa's branch 
refs/heads/master from [~flytosky]
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=12cfe83 ]

Merge pull request #425 from moazreyad/SINGA-415

SINGA-415 Moving SINGA to Gitbox

> Moving SINGA to Gitbox
> --
>
> Key: SINGA-415
> URL: https://issues.apache.org/jira/browse/SINGA-415
> Project: Singa
>  Issue Type: Task
>Reporter: Moaz Reyad
>Priority: Minor
>
> This issue collects the internal work which is required in SINGA after 
> [moving to GitBox|https://issues.apache.org/jira/browse/INFRA-17328]. 
> Some modifications are required such as updating the [source 
> repository|http://singa.apache.org/en/community/source-repository.html] page 
> in the website.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-415) Moving SINGA to Gitbox

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706617#comment-16706617
 ] 

ASF subversion and git services commented on SINGA-415:
---

Commit 98460922a3cf67fe646b9094aaf159480f192d87 in incubator-singa's branch 
refs/heads/master from [~moazreyad]
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=9846092 ]

SINGA-415 Moving SINGA to Gitbox


> Moving SINGA to Gitbox
> --
>
> Key: SINGA-415
> URL: https://issues.apache.org/jira/browse/SINGA-415
> Project: Singa
>  Issue Type: Task
>Reporter: Moaz Reyad
>Priority: Minor
>
> This issue collects the internal work which is required in SINGA after 
> [moving to GitBox|https://issues.apache.org/jira/browse/INFRA-17328]. 
> Some modifications are required such as updating the [source 
> repository|http://singa.apache.org/en/community/source-repository.html] page 
> in the website.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-411) Local variable 'params' referenced before assignment

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706616#comment-16706616
 ] 

ASF subversion and git services commented on SINGA-411:
---

Commit 73f963727cf8bd1bfe6e8ec65cd1fedda35cf8fc in incubator-singa's branch 
refs/heads/master from xuewanqi
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=73f9637 ]

SINGA-411 Local variable 'params' referenced before assignment

- fix bug.


> Local variable 'params' referenced before assignment
> 
>
> Key: SINGA-411
> URL: https://issues.apache.org/jira/browse/SINGA-411
> Project: Singa
>  Issue Type: Bug
>Reporter: Liu Hui
>Priority: Major
> Attachments: Screenshot from 2018-11-27 10-18-12.png, Screenshot from 
> 2018-11-30 16-34-05.png
>
>
> I compiled singa(maser:commit 3d688be) from github, then run the 
> exapmles:python train.py vgg cifar-10-batches-py.
> But an error occurred when saved the model.
> The error shows in the attachment.
> Ubuntu 18.04, with kernel 4.15.0-39-generic
> python3.6.7
>  GPU : GeForce GTX 850M
>  dirver : nvidia-396
>  cuda-9.0, cdnn-7.1.4



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-411) Local variable 'params' referenced before assignment

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706615#comment-16706615
 ] 

ASF subversion and git services commented on SINGA-411:
---

Commit f506ef269ed90556924434925f6c886789976f23 in incubator-singa's branch 
refs/heads/master from xuewanqi
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=f506ef2 ]

SINGA-411 Local variable 'params' referenced before assignment

- try to fix bug.


> Local variable 'params' referenced before assignment
> 
>
> Key: SINGA-411
> URL: https://issues.apache.org/jira/browse/SINGA-411
> Project: Singa
>  Issue Type: Bug
>Reporter: Liu Hui
>Priority: Major
> Attachments: Screenshot from 2018-11-27 10-18-12.png, Screenshot from 
> 2018-11-30 16-34-05.png
>
>
> I compiled singa(maser:commit 3d688be) from github, then run the 
> exapmles:python train.py vgg cifar-10-batches-py.
> But an error occurred when saved the model.
> The error shows in the attachment.
> Ubuntu 18.04, with kernel 4.15.0-39-generic
> python3.6.7
>  GPU : GeForce GTX 850M
>  dirver : nvidia-396
>  cuda-9.0, cdnn-7.1.4



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-411) Local variable 'params' referenced before assignment

2018-12-02 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706614#comment-16706614
 ] 

ASF subversion and git services commented on SINGA-411:
---

Commit 7470b20301338f3e3aae88e0df4bf86bf9ce5ad3 in incubator-singa's branch 
refs/heads/master from xuewanqi
[ https://gitbox.apache.org/repos/asf?p=incubator-singa.git;h=7470b20 ]

SINGA-411 Local variable 'params' referenced before assignment

- fixed bug.


> Local variable 'params' referenced before assignment
> 
>
> Key: SINGA-411
> URL: https://issues.apache.org/jira/browse/SINGA-411
> Project: Singa
>  Issue Type: Bug
>Reporter: Liu Hui
>Priority: Major
> Attachments: Screenshot from 2018-11-27 10-18-12.png, Screenshot from 
> 2018-11-30 16-34-05.png
>
>
> I compiled singa(maser:commit 3d688be) from github, then run the 
> exapmles:python train.py vgg cifar-10-batches-py.
> But an error occurred when saved the model.
> The error shows in the attachment.
> Ubuntu 18.04, with kernel 4.15.0-39-generic
> python3.6.7
>  GPU : GeForce GTX 850M
>  dirver : nvidia-396
>  cuda-9.0, cdnn-7.1.4



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Incubator Podling Report (Due 5th December)

2018-12-02 Thread Justin Mclean
Hi,

The incubator PMC would appreciated if you could complete the podling report on 
time it's due on 5th December in a few days. It takes time to prepare the 
incubator report, have your mentors sign off the report and for the board to 
review it, so it's best if you can get it in early.

Thanks,
Justin


[jira] [Comment Edited] (SINGA-413) Hyper-parameter configuration API

2018-12-02 Thread Ngin Yun Chuan (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706150#comment-16706150
 ] 

Ngin Yun Chuan edited comment on SINGA-413 at 12/2/18 9:26 AM:
---

Hi [~wangwei.cs], I've pushed the API changes to the [`improve_knob_api` 
branch|https://github.com/nginyc/rafiki/compare/improve_knob_api]. Do you have 
any feedback on the revised model knob configuration API before I finish it up? 
The worker-side implementation for this improvement is not complete yet - 
wanted to get your feedback first.



was (Author: nginyc):
Hi [~wangwei.cs], I've pushed the API changes to the [`improve_knob_api` 
branch|https://github.com/nginyc/rafiki/compare/improve_knob_api]. Do you have 
any feedback on the revised model knob configuration API before continuing? The 
worker-side implementation for this improvement is not complete yet - wanted to 
get your feedback first.


> Hyper-parameter configuration API
> -
>
> Key: SINGA-413
> URL: https://issues.apache.org/jira/browse/SINGA-413
> Project: Singa
>  Issue Type: Improvement
>Reporter: wangwei
>Priority: Major
>
> The current API for hyper-parameter configuration in Rafiki requires the 
> model contributor to implement
> {code:java}
> def get_knob_config(self):
> {
> 'knobs': {
>'hidden_layer_units': {
>'type': 'int',
>'range': [2, 128]
>},
>  ...
>  }
> def init(self, knobs):
> self.hidden_layer_units = knobs.get(hidden_layer_units){code}
> The json style can be replaced by
> {code}
> def check(knobs, val):
>if knobs[0].value() == 4 and val == 4:
>   return False
>else:
>   return True
> def register_knobs(self):
>self.hidden_layer_units = Knob(32, kInt, range=(2, 128))
>self.learning_rate = Knob(0.02, kExpFloat, range=(1e-1, 1e-4))
>self.batch_size = Knob(8, kIntCat, range = [4, 8, 16]))
>self.num_epoch = Knob(4, kIntCat, range = [4, 8, 16], 
> depends=self.batch_size, callback=check()))
> def train(self):
>for i in range(self.num_epoch.value()):
>   ...{code}
> The worker's workflow is like
> {code:java}
> for trial in range(total_trials):
>model = Model()
>model.register_knobs()
>knobs = [x for x, y in model.__dict__.getitems() if isinstance(y, Knob)]
>if trial == 0:
>  reigster_knobs_to_advisor(knobs)
>get_knobs_from_advisor(knobs){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (SINGA-413) Hyper-parameter configuration API

2018-12-02 Thread Ngin Yun Chuan (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706150#comment-16706150
 ] 

Ngin Yun Chuan edited comment on SINGA-413 at 12/2/18 9:26 AM:
---

Hi [~wangwei.cs], I've pushed the API changes to the [`improve_knob_api` 
branch|https://github.com/nginyc/rafiki/compare/improve_knob_api]. Do you have 
any feedback on the revised model knob configuration API before continuing? The 
worker-side implementation for this improvement is not complete yet - wanted to 
get your feedback first.



was (Author: nginyc):
Hi [~wangwei.cs], I've pushed the API changes to the [`improve_knob_api` 
branch|https://github.com/nginyc/rafiki/compare/improve_knob_api]. The 
worker-side implementation for this improvement is not complete yet - wanted to 
get your feedback on the revised model knob configuration API before continuing.


> Hyper-parameter configuration API
> -
>
> Key: SINGA-413
> URL: https://issues.apache.org/jira/browse/SINGA-413
> Project: Singa
>  Issue Type: Improvement
>Reporter: wangwei
>Priority: Major
>
> The current API for hyper-parameter configuration in Rafiki requires the 
> model contributor to implement
> {code:java}
> def get_knob_config(self):
> {
> 'knobs': {
>'hidden_layer_units': {
>'type': 'int',
>'range': [2, 128]
>},
>  ...
>  }
> def init(self, knobs):
> self.hidden_layer_units = knobs.get(hidden_layer_units){code}
> The json style can be replaced by
> {code}
> def check(knobs, val):
>if knobs[0].value() == 4 and val == 4:
>   return False
>else:
>   return True
> def register_knobs(self):
>self.hidden_layer_units = Knob(32, kInt, range=(2, 128))
>self.learning_rate = Knob(0.02, kExpFloat, range=(1e-1, 1e-4))
>self.batch_size = Knob(8, kIntCat, range = [4, 8, 16]))
>self.num_epoch = Knob(4, kIntCat, range = [4, 8, 16], 
> depends=self.batch_size, callback=check()))
> def train(self):
>for i in range(self.num_epoch.value()):
>   ...{code}
> The worker's workflow is like
> {code:java}
> for trial in range(total_trials):
>model = Model()
>model.register_knobs()
>knobs = [x for x, y in model.__dict__.getitems() if isinstance(y, Knob)]
>if trial == 0:
>  reigster_knobs_to_advisor(knobs)
>get_knobs_from_advisor(knobs){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SINGA-413) Hyper-parameter configuration API

2018-12-02 Thread Ngin Yun Chuan (JIRA)


[ 
https://issues.apache.org/jira/browse/SINGA-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706150#comment-16706150
 ] 

Ngin Yun Chuan commented on SINGA-413:
--

Hi [~wangwei.cs], I've pushed the API changes to the [`improve_knob_api` 
branch|https://github.com/nginyc/rafiki/compare/improve_knob_api]. The 
worker-side implementation for this improvement is not complete yet - wanted to 
get your feedback on the revised model knob configuration API before continuing.


> Hyper-parameter configuration API
> -
>
> Key: SINGA-413
> URL: https://issues.apache.org/jira/browse/SINGA-413
> Project: Singa
>  Issue Type: Improvement
>Reporter: wangwei
>Priority: Major
>
> The current API for hyper-parameter configuration in Rafiki requires the 
> model contributor to implement
> {code:java}
> def get_knob_config(self):
> {
> 'knobs': {
>'hidden_layer_units': {
>'type': 'int',
>'range': [2, 128]
>},
>  ...
>  }
> def init(self, knobs):
> self.hidden_layer_units = knobs.get(hidden_layer_units){code}
> The json style can be replaced by
> {code}
> def check(knobs, val):
>if knobs[0].value() == 4 and val == 4:
>   return False
>else:
>   return True
> def register_knobs(self):
>self.hidden_layer_units = Knob(32, kInt, range=(2, 128))
>self.learning_rate = Knob(0.02, kExpFloat, range=(1e-1, 1e-4))
>self.batch_size = Knob(8, kIntCat, range = [4, 8, 16]))
>self.num_epoch = Knob(4, kIntCat, range = [4, 8, 16], 
> depends=self.batch_size, callback=check()))
> def train(self):
>for i in range(self.num_epoch.value()):
>   ...{code}
> The worker's workflow is like
> {code:java}
> for trial in range(total_trials):
>model = Model()
>model.register_knobs()
>knobs = [x for x, y in model.__dict__.getitems() if isinstance(y, Knob)]
>if trial == 0:
>  reigster_knobs_to_advisor(knobs)
>get_knobs_from_advisor(knobs){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)