lingvo icon indicating copy to clipboard operation
lingvo copied to clipboard

pip installation issue

Open c0derzer0 opened this issue 3 years ago • 2 comments

I am tying to pip install lingvo==0.9.0. Although I have tensorflow-gpu 2.6, it downloads cpu tensorflow 2.5 which breaks rest of my dependencies. Is there a way to rectify this? Does git clone help in this case or does is it need tensorflow 2.5 to run. Specifically I just want to use distributed shampoo optimizer in the library for my problem. I'd appreciate it if you could point to any standalone implementation of it on tensorflow.

c0derzer0 avatar Feb 25 '22 21:02 c0derzer0

I think lingvo 0.9.0 was Pip packaged with Requires-Dist: tensorflow (==2.5.0). Would you be able to use lingvo 0.10.0 instead, which includes Requires-Dist: tensorflow (~=2.6.0)?

laurentes avatar Feb 25 '22 21:02 laurentes

Thanks for the suggestion. Looks like having the corresponding tensorflow-gpu version rectified the issue. Additionally I have a question on how to use the distributed shampoo code. from the distributed_shampoo_test.py is the follow code snippet enough

opt = distributed_shampoo.DistributedShampoo(
      learning_rate=1.0,
      momentum=0.0,
      start_preconditioning_steps=0,
      synchronous_preconditioning=True,
      global_step=global_step)

  # Run a single step of gradient update.
  update = opt.apply_gradients(zip([grad], [var]), global_step=global_step)

I have not looked into the distributed shampoo algorithm deeply yet. Any suggestions would be appreciated

c0derzer0 avatar Feb 28 '22 16:02 c0derzer0