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

[BUG] - Context are not checkpointable; no optimizer in Context; global_step initilization not OK #55

Open
galeone opened this issue Mar 16, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@galeone
Copy link
Member

galeone commented Mar 16, 2020

The file src/ashpy/contexts/context.py contains the following docstring

r"""
 Primitive Context Interface.
 
 ``Contexts`` are checkpointable (subclassed from :py:class:`tf.train.Checkpoint`)
 collections of variable encapsulated in a Python Class as a way to seamlessly
 handle information transfer.
 """

but the Context class inherits from Object, not from tf.train.Checkpoint.

Also, there is no way to access the optimizer from the Context object.

Moreover, we initialize in the constructor (thus, during the declaration since tf.Variable are mutable objects) the global_step with tf.Variable(0, name="global_step", trainable=False, dtype=tf.int64). This must be avoided since a context is created always from (magic) a well-defined context - therefore we can initialize this to None

@mr-ubik mr-ubik added the bug Something isn't working label Apr 7, 2020
@mr-ubik mr-ubik changed the title Context are not checkpointable; no optimizer in Context; global_step initilization not OK [BUG] Context are not checkpointable; no optimizer in Context; global_step initilization not OK Apr 7, 2020
@mr-ubik mr-ubik changed the title [BUG] Context are not checkpointable; no optimizer in Context; global_step initilization not OK [BUG] - Context are not checkpointable; no optimizer in Context; global_step initilization not OK Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants