Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

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

Closed
benbenji opened this issue Jun 26, 2019 · 6 comments · Fixed by #1433
Closed

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

benbenji opened this issue Jun 26, 2019 · 6 comments · Fixed by #1433
Assignees
Labels
bug Something isn't working feature: analysis
Milestone

Comments

@benbenji
Copy link

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
Copy link
Member

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

@benbenji
Copy link
Author

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
Copy link
Member

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 added bug Something isn't working feature: analysis labels Jun 27, 2019
@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
Copy link
Member

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
Copy link
Author

benbenji 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
Copy link

MikhailArkhipov 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working feature: analysis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants