Submitted by ConsciousInsects t3_103azcq in deeplearning

I was just starting out with ML and had no clue what I was doing. But eventually, I caught on and started reading about best practices and other stuff and I was reading an article about why most people won’t use newer software frameworks. Specifically, the ones that are still hosted on Github.

I have a feeling people don't want to learn new things because they already worked hard to learn something else. Changing to a new way of doing things can be hard if it doesn't work with what you are already using. And it's hard to convince people to switch unless it’s a mandatory switch.

But I also think choosing a framework depends on people’s needs for their projects. If that project could benefit from that new framework or just use it out of curiosity, people would definitely try it out. If not, they’ll just stick to the popular frameworks (i.e. TensorFlow or PyTorch).

So far what are your thoughts? Do you also use frameworks aside from the popular ones?

134

Comments

You must log in or register to comment.

Nater5000 t1_j2y3k0e wrote

>Do you also use frameworks aside from the popular ones?

No, and this isn't just limited to deep learning. Anybody with even a small amount of engineering experience will have learned the pitfalls of trying to work with immature frameworks, libraries, concepts, etc. When you're building anything non-trivial, you're not just choosing a framework- you're investing in it. If the framework ends up being trash, or it becomes obsolete/abandoned, or you have a hard time finding resources for it, then you're risking the success of your entire project. As such, most engineers prefer the safety of maturity.

To illustrate: If I get some weird, cryptic error from PyTorch, I can usually just copy it, paste it into Google, and find a result immediately describing it and how to resolve it. Try doing that for some new, immature framework and quickly become disappointed as you realize that not only are you on your own in terms of understanding the issue and troubleshooting it, but you may even be the one responsible for fixing it. That's a tough sell for anyone who values their time.

​

>I have a feeling people don't want to learn new things because they already worked hard to learn something else.

This may be a factor, but it's relatively minor compared to what I described above. I used to be all-in on TensorFlow. Once it became clear, at least in the domain I was focused on, that PyTorch was "winning," I switched over. There was some time I had to dedicate to figuring it out, but the switch was easy since I knew PyTorch was also mature. In fact, the reason I had originally invested in TensorFlow over PyTorch was because, at the time, PyTorch wasn't very mature and it seemed risky to invest anytime into it.

​

>But I also think choosing a framework depends on people’s needs for their projects. If that project could benefit from that new framework or just use it out of curiosity, people would definitely try it out.

In a vacuum this makes sense. But, like I said, there's a cost to adopting new frameworks/libraries. If there's a new framework that does something that'd take me weeks to develop on my own, I may try it out. But if it's a critical component and that new framework isn't very mature, I won't even touch it (although I may look through it for inspiration). I don't want my project to be dependent on something that may break/become obsolete/be full of bugs/etc., even at the cost of my time and effort.

Odds are if you're making a new framework, you'd be better off contributing to an existing framework.

23

StabbyPants t1_j2z0777 wrote

odds are, the mainline supported frameworks have so much work put in to them that you'd have to duplicate that it's almost never a good idea to go solo

2

waffles2go2 t1_j3m8xga wrote

The punchline is, if you need solid results, you can't generally risk the newer frameworks as you end-up debugging and/or not trusting the results (so you validate on other stacks....).

It's sort of close to a meritocracy + most people aren't using the capabilities of the existing stuff...

2

suflaj t1_j2yhjdw wrote

My man, I only recently convinced myself to start using PyTorch Lightning, no way I'd be able to switch to some other new hip marginally better framework, when it was this hard to start using something that speeds stuff up 10x.

Unless there are clear benefits to switching to some other new technology, it's not worth it.

5

BellyDancerUrgot t1_j3013um wrote

Quick question is PyTorch lightning a better PyTorch or is it more ‘streamlined’ (meaning high level) like say keras for tf

2

suflaj t1_j319k9o wrote

It's basically just a higher abstraction layer for PyTorch. It's completely separate but works in tandem with PyTorch.

I use LightningModules (analogous to torch.nn.Module) as basically decorators over ordinary PyTorch models. So you have your model class, and then you create a LightningModule which is instantiated with said model, where you implement ex. what optimizers and schedulers you use, how your training, evaluation and testing goes, what metrics you track and when etc.

But once you're done with R&D you can just use ordinary PyTorch as-is, that's why I like it. It doesn't make setting stuff up for production different in any way, but it makes plenty of stuff during R&D effortless. It has some smelly parts but IMO they're not a dealbreaker, just take a day or two to learn it.

4

enterthesun t1_j30tlfx wrote

I hope PL is better than the Keras situation because I’m very excited about PL and a big reason I started learning PyTorch was to avoid the crutch that is Keras.

2

BellyDancerUrgot t1_j30uc0r wrote

Keras is a good tool when getting started imo. But eventually it’s better to switch to PyTorch because it’s more pythonic and although tensorflow used to be the deployment standard PyTorch has caught up and add to that tf doesn’t even have a team working on it anymore iirc since everyone moved onto jax. I will say tho PyTorch can be very frustrating to work on initially because a lot of the internal optimizations that keras does are absent in PyTorch. I’ve never used PL tho.

2

enterthesun t1_j32div1 wrote

Wow no one working on tf that’s crazy I didn’t know that!

2

kraegarthegreat t1_j316z7p wrote

I found PL helped reduce boilerplate code while still giving the niceties of torch versus tf.

The main thing I like is that it abstracts the training loops while still giving you the ability to add custom code to any part of the training loop. This likely sounds weird, but check out their page. 12/10 recommend.

2

todeedee t1_j31v7pu wrote

JAX looks appealing, but totally agree -- I'm not ready to go back to using Bazel to build code from source

1

WinterExtreme9316 t1_j30dfgv wrote

You must have never spent a ridiculous amount of time learning and building on some api, just for some committee or company board to decide its time to "end-of-life" it (i.e. can the whole thing). It changes you, and your future api choices.

3

Appropriate_Ant_4629 t1_j32exrg wrote

Sounds almost like you're talking about the first TensorFlow.

Or Torch-before-PyTorch.

1

Final-Rush759 t1_j312pgq wrote

JAX is the new toy,. It's not customer framework.

1

deepl3arning t1_j32tbjs wrote

I started native C++/CUDA. I don't recommend it. Debugging was a nightmare, and the environment was immature at best. There were undocumented exceptions, errors and inconsistencies throughout with unknown dependencies which would break your code catastrophically on a simple driver update.

I pushed into Theano, then TF/Keras and now spend most of my time with PyTorch.

As Nater5000 mentioned, now you can just google any weird error. Someone will have likely encountered it before, and probably has a workaround. For me, I also really appreciate the confidence I can have in my results. If something goes wrong, I can safely assume that I have messed up somewhere. I can have confidene in the outcomes, either good or bad.

If you need something peculiar, then you're probably best off looking at extending or overriding the existing frameworks. For a starter, the frameworks will make your life a lot easier, many examples/videos/articles available for PT/TF. Best of luck with your journey

1

Doc_Zed_42 t1_j40ivbi wrote

I've been trying to get to lucid Sonic dreams running again it's been a real pain in the butt I used to run on tensorflow and I found a pie torch version but it's still giving me erroring and versioning issues Any assistance or links to notebooks you guys can offer would be really appreciated

1