Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtaining operation name in LogGraph #33

Open
shashikdm opened this issue May 28, 2019 · 1 comment
Open

Obtaining operation name in LogGraph #33

shashikdm opened this issue May 28, 2019 · 1 comment

Comments

@shashikdm
Copy link
Contributor

When building a graph (#32), it is very important to obtain the name of the function that was executed to obtain each Tracked variable.
e.g.

x = param(rand(2,2))
y = param(rand(2,2))
z = x*y

I want to find the symbol * from z alone.

@shashikdm
Copy link
Contributor Author

So far I have tried the following, but these are not consistent.
z.tracker.f.func.f
methods(z.tracker.f.func).ms[1].name
methods(z.tracker.f.func).ms[1].roots[4]
methods(z.tracker.f.func).mt.name
This may work for some operation but for other operations, I end up getting :back or Symbol(#<somenumber>))
I'm absolutely stuck here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant