define_metric parameter ‘hidden’ not working? - wandb

I want specific metrics to be used exclusively as x-axis/independend variable in the Weights&Biases-Dashboard graphs. But no matter how I set them up, there are automatically generated panels in the Dashboard that plot these metrics against the step-count.
Here is my setup:
# define x-axes
wandb.define_metric("batch#", hidden=True) # "hidden" not working
wandb.define_metric("epoch#", hidden=True)
# define metrics and match to x-axis
wandb.define_metric("loss", step_metric="#batch#")
wandb.define_metric("f1", step_metric="epoch#")
I want graphs of loss/batch# and f1/epoch# on my dashboard, but not graphs of batch#/step or epoch#/step. Therefore, I set the function parameter ‘hidden’ to True for these. It does not work, I still get automatically generated panels of them. Any advice?

Related

Environment toggle in Sumologic dashboard

I've created a dashboard to monitor errors & warnings for my app.
I'm logging to separate locations (_sourceHost) based on environment (uat, prod).
I'd like to have a toggle on the dashboard so I can easily switch between UAT & Prod, rather than having to maintain two dashboards.
I'd tried adding a filter but the best I could achieve was a textbox where I enter the _sourceost...
Any ideas?
You could probably achieve this with a search template. Basically, set up a parameter that's the value of the _sourceHost:
_sourceHost={{source_host}}
| the rest of your query here...
Then in the "manage parameter settings" dialog, you could "Set Values for Parameter" to your environment key/value mapping.
Then when you add it to the dashboard it should treat that parameter as a filter, and I believe the values you set up will dropdown from the filter to be selected.

Rails Admin global label change

There is a label tag to change the label of an attribute, but it has to be mentioned for every tab. For ex. If I have an attribute abc but I want the label as ABC (not Abc that happens automatically), but I want all other labels to remain as they are, I am having to go and edit each block like SHOW, LIST, EDIT etc individually and set a label for that attribute in all those options after which I will also have to include defaults.
Is there any way to do it globally, like to set label of an attribute globally in a model based configuration so that I don't have to do it individually and it reflects in all the tabs.
Note : I am configuring rails admin in every model using rails_admin block

ToolTip Performance in XPages

I have a large XPage with about 170 fields on it. I have tooltips for a fair number of the fields. The tooltip does a lookup into a help DB and returns the related text. They work fine but they significantly slow down the load process because of the number of times the lookup is performed. I put a dBar.info statement in the JS that loads the text and in one load the document and put it into edit mode it would appear to have fired that one tooltip lookup 6 times. If it does that for every one of the tooltips then clearly that is the reason for the slow performance of the XPage. I did it both with the DynamicContent set to both true and false with similar results. I'm tempted to just remove the tool tips but that kind of defeats the purpose.
Is there a way to limit the tooltip to only fire the lookup when called? Like something linked to the MouseOver event. It seems to me the tooltip in the extension Library works OK if there are only a few fields requiring inline help but does not scale well.
Just as a test I removed all the tooltips from the XPage and while the loading is slow it is probably acceptable, but the tooltips slow it to the point of unacceptability.
Bill,
This is an excellent use case for an ApplicationScope bean. Create a bean that implements Map and uses an internal HashMap as cache. Let's call it tooltip. In your tooltip you define the label as EL e.g. tooltip['Manager']. XPages will call the get function. In it you check the internal HashMap if you have the value, otherwise you look it up. So lookup happens once only.
You could instead of looking up on demand opt for loading when initialized. Using a view navigator that should be very fast. Since it would be an Application scope only loaded once.
Makes sense?
You can use view.isRenderingPhase() to minimise the lookups during a partial refresh. With the tooltip you can also change the showDelay property so the tooltip has a delay before showing. This is a good thing to do for a view, so it doesn't try to load each tooltip as the mouse moves down the page. dynamicContent="true" may also mean it's not loaded with the page, but only when called - I haven't checked this so I'm not certain.

How can I specify the jvm agent id when querying the metrics on the New Relic v1 REST API?

I am trying to get JVM metrics from my application, which runs three instances, with three separate JVMs. I can see the different data that I am interested in in the New Relic dashboard, on the Monitoring -> JVMs tab. I can also get the information I want for one of those JVMs, by hitting the REST API like so:
% curl -gH "x-api-key:KEY" 'https://api.newrelic.com/api/v1/applications/APPID/data.xml?metrics%5B%5D=GC%2FPS%20Scavenge&field=time_percentage&begin=T1&end=T2'
(I've replaced the values of some fields, but this is the full form of my request.)
I get a response including a long list of elements like this:
<metric name="GC/PS Scavenge" begin="T1" end="T2" app="MYAPP" agent_id="AGENTID">
<field name="time_percentage">0.018822634485032824</field>
</metric>
All of the metric elements include the same agent_id fields, and I never specified which agent to use. How can I either:
get metrics for all agents
specify which agent I am interested in (so I can send multiple requests, one for each JVM)
agent_id can be a particular JVM instance, and while you can't request for multiple agents at once you can request metrics for a single JVM.
You can get the JVM's agent_id in one of two ways:
1) an API call to
https://api.newrelic.com/api/v1/accounts/:account_id/applications/:app_id/instances.xml
2) browse to the JVM in the New Relic user interface (use the 'JVM' drop-down at the top right after you select your app), then grab the ID from the URL.
The ID will look something like [account_id]_i2043442
Some data is not available broken down by JVM, most notably a call to threshold_values.xml won't work if the agent_id isn't an application.
full documentation of the V1 API: http://newrelic.github.io/newrelic_api/

Multiple select field in LocomotiveCMS?

I need to set up a field in LocomotiveCMS that is similar to Select but allows multiple selections. Something like in HTML... does LocomotiveCMS allow for that, or will I have to do some ruby coding to get that to work?
Any help would be appreciated, thanks!
Old question but still a thing.
I'm unsure whether your question relates to fields within the Locomotive CMS Back Office or on the front end so I've addressed both below.
Front End
Irrespective of whether or not you're dealing with Locomotive CMS content types, either of the following will allow selection of multiple values on the front end:
Listbox (select element with the multiple attribute)
A series of checkbox inputs with the same value in the name property
Back Office
If you need to allow selection of multiple values within the Back Office, you can do this for content types using the has_many or many_to_many content type relationships.
If you need multiple value selection outside of content types (e.g. in metafields schema) you're unfortunately out of luck.

Resources