IBM DOORS DXL Link report - websphere

Using DOORS 9.6 I need a Link report similar to the Analysis Wizard reports except:: I want a single line presenting the links from the initial node down to the leaf node. If A has links to B,C and then B has a link to D..
I would like to see the results of an Analysis Wizard with a display like this:
A->B->D
A->C
The initial node would simply be the current module

Related

Teacher-Student System: Training Student With k Target Sequences for Each Input Sequence

This question is related to Teacher-Student System: Training Student with Top-k Hypotheses List
I want to configure a teacher-student system, where a teacher seq2seq model generates a top-k list of hypotheses, which are used to train a student seq2seq model.
I select the top-k hypotheses list from the teacher’s ChoiceLayer (or output layer) by:
"teacher_hypotheses": {
"class": "copy", "from": ["extra.search:teacherMT_output"],
"register_as_extern_data": "teacher_hypotheses_stack"
}
The output Data of that layer has a batch axis length batch_size=k=4 times the length of the input Data’s batch axis length (cf. doc and code of: Data.copy_extend_with_beam, SearchChoices.translate_to_common_search_beam).
teacher_hypotheses_stack is selected as the student’s training target. But this leads to the following error:
TensorFlow exception: assertion failed: [shape[0]:] [92] [!=] [dim:] [23]
[[node studentMT_output/rec/subnet_base/check_seq_len_batch_size/check_input_dim/assert_equal_1/Assert/Assert (defined at home/philipp/Documents/bachelor-thesis/returnn/returnn-venv/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py:1748) ]]
Which is, I assume, due to the issue that the target data of the student, the hypotheses list, has a batch axis length k=4 times longer than the one of the student’s input data/encoder state data.
What do I have to do, to enable the student’s decoder to have k different target sequences for each input sequence?
EDIT (12th June 2020): I took a look into the TensorFlow graph via TensorBoard, to inspect the node mentioned in the error. To me it looks like, the target’s batch axis length is validated against the batch axis length of the student’s overall input data (meaning the encoder input data). So this check seems to be independent of what I feed into the student’s decoder.
EDIT (15th June 2020): Following Albert's advice, I opened an issue on GitHub, related to my problem: Targeting Beam as Training Target Causes Dimension Error
This might actually be a bug. Via register_as_extern_data, I'm not exactly sure that the logic of translate_to_common_search_beam is correct. I think the code currently expects that a target never has a beam.
So, to answer your question: I think you are doing it already correct (so we can close this StackOverflow question).
You should open a GitHub issue about this (and then link it here). It would be good to come up with a simple test case:
I.e. where there is some beam (you don't even need RecLayer for that, just a single ChoiceLayer would be enough I think),
then register_as_extern_data on that,
and then some other layer which uses this target in some way (e.g. just with "loss": "ce").
Probably this will cause exactly your problem.

Tictoc Tutorial:Why are the positions of the module vectors overlapping,not separate?

I am learing the OMNeT++ With Tictoc Tutorial,however I encounter a problem in the part4.1 "More than two nodes".
According to the tutorial, the tictoc10.ned can generate six simple modules in different locations.But there is just a module vector icon in my ned file even if I completely copy the tictoc10.ned file.
I guess there maybe some properties which I need to set but it doesn't work at all.And I also scrolling through the 'simulation manual' with no result.
simple Txc10
{
parameters:
#display("i=block/routing");
gates:
input in[];
output out[];
}
network Tictoc10
{
submodules:
tic[6]: Txc10; //this line should generate 6 Txc10 modules with
//different positions
//ingnore the connections
}
Thank you for any suggestions.
The NED editor in the IDE displays only the structures present in the NED file. I.e. you will not see several icons in the graphical editor only a single icon that represents the vector. On the other hand, when you actually run the simulation, the correct number of instances from the node will be instantiated and the autolayouter will arrange them.
There are two places to pay attention to.
1.as like the former answer says,the NED editor in the IDE displays only the structures present in the NED file. And you can find the several module icons when you run the simulation.
2.The size of the network in the 'Design' mode of the NED file need to be adjusted according to the quatity of the submodules in this network. In this example,the size of network is so small that submodules overlapp and the connections between can't be found.After I enlarge it the problem is solved.

Golang pprof full call graph

I'm kinda new to pprof. I've started CPU profiling, and after a bit of time checked the top25. This is what I got:
Showing top 25 nodes out of 174
flat flat% sum% cum cum%
1.01mins 21.92% 21.92% 1.10mins 23.83% time.Time.AppendFormat
0.26mins 5.56% 27.48% 0.26mins 5.56% type..eq.[65]runtime.sigTabT
0.23mins 5.07% 32.55% 0.23mins 5.07% type..hash.[3]runtime.symbol_key
0.15mins 3.14% 35.69% 0.15mins 3.14% type..hash.[9]string
...
I thought that's all cool, I just need to get rid of that time function. Then realized, I don't even use anything from the time pkg, so it must be either a third party lib, or one of the go internal functions.
So I've generated the graph with the -web flag, so I can see which function calls it, but it doesn't really show directly. Is there any way to track it down where it's coming from?
I've been using the following approach to see everything.
go tool pprof -http :9999 -edgefraction 0 -nodefraction 0 -nodecount 100000 cpu.prof
This can give you a huge graph which can be quite difficult to follow. To help with that you can click on the offending node in the web view and select 'Focus' from the 'Refine' menu in the top left corner. This provides a view of that node and all its callers and callees.
The key options to use in order to see everything are:
--nodecount=<n> Show at most so many nodes [default=80]
--nodefraction=<f> Hide nodes below <f>*total [default=.005]
--edgefraction=<f> Hide edges below <f>*total [default=.001]
You can also use -focus on the command line to speed up rendering of large graphs.
--focus=<regexp> Focus on nodes matching <regexp>

Creating call graph

I am looking for a possibility to generate a call graph for Go projects. Something similar to Doxygen's diagram functionality for C++ classes (with the option CALL_GRAPH=YES).
So far I found
http://saml.rilspace.org/profiling-and-creating-call-graphs-for-go-programs-with-go-tool-pprof
or
http://blog.golang.org/profiling-go-programs
This samples the call stack of your program 100 times per second while the program is running and creates a graph useful for profiling. If your program spends most of its time in functions not relevant to you, I found this solution not very usefull.
Then there is this:
https://godoc.org/golang.org/x/tools/go/callgraph/static
which from its description sounds like what I would need, but there seem to be no docs and I don't understand how to use it.
I also found
https://github.com/davecheney/graphpkg/blob/master/README.md
and
https://github.com/paetzke/go-dep-graph/blob/master/README.org
but they create only dependency graphs.
Take a look here:
http://dave.cheney.net/2014/10/22/simple-profiling-package-moved-updated
https://github.com/pkg/profile
func main() {
defer profile.Start(profile.CPUProfile, profile.ProfilePath(".")).Stop()
// Rest of program
}
Build and run your program as per normal. You'll see the profiling hook
mentioned:
2015/07/12 09:02:02 profile: cpu profiling enabled, cpu.pprof
Run your program (bench it, run through it, etc) to generate the profile during
runtime. Once you've hit what you want, quit and then generate the call-graph:
go tool pprof -pdf -output cgraph.pdf $YOURPROGBINARY cpu.pprof
You can also run go tool pprof $YOURPROGBINARY cpu.pprof to get an
interactive prompt where you can call top10 or web to generate an svg. Type
help at the pprof prompt to get a list of commands.
e.g. - here's the CPU profile for a buffer pool implementation I wrote:
~/Desktop go tool pprof poolio cpu.pprof
Entering interactive mode (type "help" for commands)
(pprof) top5
24770ms of 35160ms total (70.45%)
Dropped 217 nodes (cum <= 175.80ms)
Showing top 5 nodes out of 74 (cum >= 650ms)
flat flat% sum% cum cum%
12520ms 35.61% 35.61% 12520ms 35.61% runtime.mach_semaphore_wait
9300ms 26.45% 62.06% 9360ms 26.62% syscall.Syscall
1380ms 3.92% 65.98% 2120ms 6.03% encoding/json.(*encodeState).string
1030ms 2.93% 68.91% 1030ms 2.93% runtime.kevent
540ms 1.54% 70.45% 650ms 1.85% runtime.mallocgc
And here's a quick way to generate a PNG from the prompt:
(pprof) png > graph.png
Generating report in graph.png
Which outputs this:
You were close with …/x/tools/go/callgraph/static. I'm pretty sure go install golang.org/x/tools/cmd/callgraph is what you want. Once installed run it without arguments to see it's full help/usage.
(In general, the things under …/x/tools/ are somewhat reusable packages with command line front-ends living under …/x/tools/cmd, you can install them all with go install golang.org/x/tools/cmd/..., the literal /... matches all sub-packages).
E.g. running just callgraph produces usage output that starts with:
callgraph: display the the call graph of a Go program.
Usage:
callgraph [-algo=static|cha|rta|pta] [-test] [-format=...] <args>...
Flags:
-algo Specifies the call-graph construction algorithm, one of:
static static calls only (unsound)
cha Class Hierarchy Analysis
rta Rapid Type Analysis
pta inclusion-based Points-To Analysis
The algorithms are ordered by increasing precision in their
treatment of dynamic calls (and thus also computational cost).
RTA and PTA require a whole program (main or test), and
include only functions reachable from main.
-test Include the package's tests in the analysis.
-format Specifies the format in which each call graph edge is displayed.
One of:
digraph output suitable for input to
golang.org/x/tools/cmd/digraph.
graphviz output in AT&T GraphViz (.dot) format.
It can produce arbitrary formatted output (using Go's template syntax) or graphviz or digraph output. The last is a tool you can install with go install golang.org/x/tools/cmd/digraph (and once again, full/help usage is seen by running it without arguments) and can answer queries about arbitrary directed graphs (including call graphs obviously).
Another approach, which does use golang.org/x/tools go/callgraph is the ofabry/go-callvis project:
(Go 1.13+)
The purpose of this tool is to provide developers with a visual overview of a Go program using data from call graph and its relations with packages and types.
support for Go modules!
focus specific package in the program
click on package to quickly switch the focus using interactive viewer
group functions by package and/or methods by type
filter packages to specific import path prefixes
ignore funcs from standard library
omit various types of function calls
Example (based on this Go code project):
How it works
It runs pointer analysis to construct the call graph of the program and uses the data to generate output in dot format, which can be rendered with Graphviz tools.
To use the interactive view provided by a web server that serves SVG images of focused packages, you can simply run:
go-callvis <target package>
HTTP server is listening on http://localhost:7878/ by default, use option -http="ADDR:PORT" to change HTTP server address.
I used golang callgraph recently, and I build a web tool with python + callgraph called CallingViewer here: https://github.com/fiefdx/CallingViewer , it maybe rough, but it work, the screenshot at below:
screenshot of CallingViewer

JMeter - saving results + configuring "graph results" time span

I am using JMeter and have 2 questions (I have read the FAQ + Wiki etc):
I use the Graph Results listener. It seems to have a fixed span, e.g. 2 hours (just guessing - this is not indicated anywhere AFAIK), after which it wraps around and starts drawing on same canvas from the left again. Hence after a long weekend run it only shows the results of last 2 hours. Can I configure that span or other properties (beyond the check boxes I see on the Graph Results listener itself)?
Can I save the results of a run and later open them? I know I can save the test plan or parts of it. I am unclear if I can save separately just the test results data, and later open them and perform comparisons etc. And furthermore can I open them with different listeners even if they weren't part of original test (i.e. I think of the test as accumulating data, and later on I want to view and interpret the data using different "viewers").
Thanks,
-- Shaul
Don't know about 1. Regarding 2: listeners typically have a configuration field for "Write All Data to a File", which lets you specify the file name. You can use the Simple Data Writer to store results efficiently for later analysis.
You can load results from a previous test into a visualizer by choosing "Write All Data to a File" and browsing for the file you wish to load. Somewhat counterintuitively, selecting a file for writing also loads that file into the visualizer and displays the results. Just make sure you don't run the test again while that file is selected, otherwise you will lose your saved test data. :-)
Well, I later found a JMeter group that was discussing the issue raised in my first question, and B.Ramann gave me an excellent suggestion to use instead a better graph found here.
-- Shaul

Resources