Lightning-AI / pytorch-lightning

Pretrain, finetune ANY AI model of ANY size on multiple GPUs, TPUs with zero code changes.
https://lightning.ai
Apache License 2.0
28.39k stars 3.38k forks source link

Is there any plan to support the tensorflow? #18520

Open joshua-xia opened 1 year ago

joshua-xia commented 1 year ago

Description & Motivation

I am trying to promote the lightning among my colleagues, it is easy to merge from pytorch model to ligthning, but the problem is that some colleague using tensorflow, Is there any plan to support the tensorflow in the future?

Thanks!

Pitch

No response

Alternatives

No response

Additional context

No response

cc @borda

Borda commented 1 year ago

Hello, good question. Regarding the philosophy being simple, would it be easier to convert your TensorFlow models to pytorch by any other tool and then use lightning?

cc: @aniketmaurya

joshua-xia commented 1 year ago

Yes, the simple tensorflow model can be converted to pytorch model, so that we can use lightning; but the complex tensorflow model is binding to tensorflow environment so that is very difficult to convert.

I also try to compare keras to lightning, It is obviously that lightning is much more beautiful and well design. so it will be very welcomed if lightning support both pytorch and tensorflow two backends!

Borda commented 1 year ago

it will be very welcomed if lightning support both pytorch and tensorflow two backends!

On that front, I would be instead in favor of providing some detailed guide on how to convert that support TF... as we see that most of the research has already moved from TF to PT, what would be your motivation to keep some TF models/flows?

cc: @lantiga

joshua-xia commented 1 year ago

it will be very welcomed if lightning support both pytorch and tensorflow two backends!

On that front, I would be instead in favor of providing some detailed guide on how to convert that support TF... as we see that most of the research has already moved from TF to PT, what would be your motivation to keep some TF models/flows?

cc: @lantiga

Yes, I knew that most of the research is implemented by PT, but there are also many projects and models still depend on TF, especially the projects required to deploy on realtime inference fast base on TF environment which support more complex needs, We wish use the well design lightning framework to rapid develop model and at the same time deploy on TF environment smoothly without converting the model。

Thanks!

blackwint3r commented 10 months ago

Maybe a better option would be to make lightning support ivy. As they claimed, Ivy is a unified AI framework that allows you to write framework-agnostic code or translate models from one framework to another. Therefore, it provides an abstraction from a different perspective than lightning.

I've been thinking about how to make lightning and ivy work together (at least when ivy's backend is set to pytorch), so I can take advantage of the convenience both offer, to truly focus only on models and algorithms without focusing on implementation.