Global parameters in static model

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Global parameters in static model

lucasmcgrew
Is there any way to define "global" parameters in a model definition that will be visible to the glu script for each entry defined in the model?  I know there is global metadata, but it seems that the metadata is only visible to the console and not the glu scripts.  I'd like to do something like the following, and have the mcastGroup parameter be accessible to every entry in the model:

{
"agentTags": { ... },
"modelParams": {
  "mcastGroup": 247
},
"entries": [ ... ],
"fabric": "xxx",
"metadata": { ... }
}


Thanks,
Lucas
Reply | Threaded
Open this post in threaded view
|

Re: Global parameters in static model

frenchyan
Administrator
Right now no there is no way. 

The main idea though is that the glu model format is not necessarily what you should use internally and is actually not recommended. You should have your own representation and then run some processing to generate the glu model. So you could imagine that the processing step 'expands' your modelParams by copying them into each entry initParameters.

Of course if there is a high demand to change the model to add this feature, it can obviously be done.

Best
Yan

On Mon, Nov 28, 2011 at 11:33 AM, lucasmcgrew [via glu] <[hidden email]> wrote:
Is there any way to define "global" parameters in a model definition that will be visible to the glu script for each entry defined in the model?  I know there is global metadata, but it seems that the metadata is only visible to the console and not the glu scripts.  I'd like to do something like the following, and have the mcastGroup parameter be accessible to every entry in the model:

{
"agentTags": { ... },
"modelParams": {
  "mcastGroup": 247
},
"entries": [ ... ],
"fabric": "xxx",
"metadata": { ... }
}


Thanks,
Lucas


If you reply to this email, your message will be added to the discussion below:
http://glu.977617.n3.nabble.com/Global-parameters-in-static-model-tp3543146p3543146.html
To start a new topic under glu, email [hidden email]
To unsubscribe from glu, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Global parameters in static model

rantav
I started with the raw json and a tool that reads the json and manipulates it. But then since there was high demand for editing the json (and it's not a human friendly format), I switched to a yaml source file which is then transformed by a tool to json for the benefit of glu

On Tue, Nov 29, 2011 at 3:28 AM, frenchyan [via glu] <[hidden email]> wrote:
Right now no there is no way. 

The main idea though is that the glu model format is not necessarily what you should use internally and is actually not recommended. You should have your own representation and then run some processing to generate the glu model. So you could imagine that the processing step 'expands' your modelParams by copying them into each entry initParameters.

Of course if there is a high demand to change the model to add this feature, it can obviously be done.

Best
Yan

On Mon, Nov 28, 2011 at 11:33 AM, lucasmcgrew [via glu] <[hidden email]> wrote:
Is there any way to define "global" parameters in a model definition that will be visible to the glu script for each entry defined in the model?  I know there is global metadata, but it seems that the metadata is only visible to the console and not the glu scripts.  I'd like to do something like the following, and have the mcastGroup parameter be accessible to every entry in the model:

{
"agentTags": { ... },
"modelParams": {
  "mcastGroup": 247
},
"entries": [ ... ],
"fabric": "xxx",
"metadata": { ... }
}


Thanks,
Lucas


If you reply to this email, your message will be added to the discussion below:
http://glu.977617.n3.nabble.com/Global-parameters-in-static-model-tp3543146p3543146.html
To start a new topic under glu, email [hidden email]
To unsubscribe from glu, click here.
NAML




If you reply to this email, your message will be added to the discussion below:
http://glu.977617.n3.nabble.com/Global-parameters-in-static-model-tp3543146p3543973.html
To start a new topic under glu, email [hidden email]
To unsubscribe from glu, click here.
NAML



--