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

* imported functions are not overwritten by functions of the same name #1257

Closed
benbenji opened this issue Jun 26, 2019 · 6 comments

Comments

@benbenji
Copy link

commented Jun 26, 2019

When I type tf.tuncated ,the server show out the deprecated formation of the function truncated_normal just as the picture shows:
image
I cleanly remembered one of the previous versions of the python-language server can complete all the options of this functions to be choosed by users ,so I am confused very much that whether it is a bug or the problem of my computer.Can any body help me? Thank you very much the version of my tensorflow is 1.12.0 ,my hardware is macOs mojave 10.14

@benbenji benbenji changed the title server automatic the deprecated function of tensorflow server automatic complete the deprecated function of tensorflow Jun 26, 2019

@jakebailey

This comment has been minimized.

Copy link
Member

commented Jun 26, 2019

Are you saying that this function shouldn't show up at all? What behavior are you expecting here?

@benbenji

This comment has been minimized.

Copy link
Author

commented Jun 27, 2019

Are you saying that this function shouldn't show up at all? What behavior are you expecting here?

No man,I mean the server show the wrong formation of this function with the wrong parameters which has been already deprecated by tensorflow, the right parameters is truncated_normal(shape, steddv,mean ....) ,it is totally different with that picture,and it is really not convenient.

@jakebailey

This comment has been minimized.

Copy link
Member

commented Jun 27, 2019

Following the definition back, the function that we're finding is in gen_random_ops.py, which looks like:

def truncated_normal(shape, dtype, seed=0, seed2=0, name=None):

But we should be finding the one in random_ops.py, which looks like:

def truncated_normal(shape,
                     mean=0.0,
                     stddev=1.0,
                     dtype=dtypes.float32,
                     seed=None,
                     name=None):

This is because random_ops.py, does:

from tensorflow.python.ops.gen_random_ops import *

So gets the first function, but the redefinition doesn't seem to have occurred.

@jakebailey jakebailey changed the title server automatic complete the deprecated function of tensorflow * imported functions are not overwritten by functions of the same name Jun 27, 2019

@jakebailey

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

With #1433:

image

@MikhailArkhipov MikhailArkhipov self-assigned this Aug 13, 2019

@MikhailArkhipov MikhailArkhipov added this to the August 2019.1 milestone Aug 13, 2019

@benbenji

This comment has been minimized.

Copy link
Author

commented Aug 17, 2019

Hello man @jakebailey in my computer this bug still happens, I have already update python server in vscode market.
image

@MikhailArkhipov

This comment has been minimized.

Copy link
Member

commented Aug 17, 2019

The changes are not in the stable download channel yet, they are in beta.

"python.analysis.downloadChannel": "beta"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.