chaserileyroberts / mltest

Testing framework to simplify writing ML unit tests.
MIT License
346 stars 25 forks source link

Errors with TF 2.0 #8

Open gndowns opened 5 years ago

gndowns commented 5 years ago

This issue is meant to be a place to discuss all issues related to usage with Tensorflow 2.0, and potential robust solutions

Issues

  1. tensorflow has no attribute reset_default_graph

command:

>>> import mltest
>>> mltest.setup()

output:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/gdowns/venv_mltest/lib/python3.7/site-packages/mltest/mltest.py", line 39, in setup
    tf.reset_default_graph()
AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'

Potential Long-Term Solutions

ucalyptus commented 4 years ago

for my machine with Python 3.6.8 and now TF 1.14.0

import mltest mltest.setup() gives the warning of deprecation for reset_default_graph()

and suggests to use tf.compat.v1.reset_default_graph() Guess I'll add that

ucalyptus commented 4 years ago

@gndowns any updates?

gndowns commented 4 years ago

@ucalyptus Sorry but I am no longer working on this.

chaserileyroberts commented 4 years ago

I think it sadly has come time to deprecate this library...

bmiselis commented 4 years ago

Are you planning to create a new version of it or know any alternatives?

chaserileyroberts commented 4 years ago

At this time no.

Many of the things we were testing against are ready features of Keras, mainly the "make sure all variables get trained" has been in keras even before this library existed.

However, if someone wishes to port this to TF2, I'd gladly link it here like I did with the Pytorch version.

zaccharieramzi commented 4 years ago

@Thenerdstation do you know if those ready features of Keras were ported to tf.keras in Tf 2.x?

I have been looking around a bit in here but didn't find anything satisfactory.