Live data from Hacker News

What's up in the Python community? – April 2023

bitecode.substack.com

51–60 of 63 posts

Re: What's up in the Python community? – April 2023

#51
post #3

I never saw this newsletter before but I must say I am impressed. Fantastic approach to writing style and a great showcase of domain knowledge. The Web could use more of this.

Reminds me of the Orbital Index but for Python. I’d love a similar Typescript oriented site for the day job, any recommendations?

Re: What's up in the Python community? – April 2023

#52
post #10

Question from a beginner: I'm deploying a python project to aws (beanstalk + lambda, among others), and I've noticed I can only use python versions 3.9 and 3.8. Why is that? Is 3.10 not considered stable?

It’s that a lot of the libraries take a while to catch up. 3.10 is pretty good to use lately with PyTorch and numpy, which I mention because they are usually the main stragglers I have to track. They are both compiled with your friendly local architecture’s stack. Pydantic and FastAPI almost fell over because of changes to annotation handling, but woosh. That drama was forestalled. I think the python 3.3+ series has…

As is, it appears to mostly be:

major version = backwards compatibly break

minor version = forward compatible break

I think this is how it has always been, in general. I've seen many new people very confused by python 3 code not running with "python3". The very embarrassing answer is "You can't really know what the minimum python version unless it's documented, or you scan it with an external tool".

Is there a reasonable alternative? Pip upgradable transpiler?

Re: What's up in the Python community? – April 2023

#53
post #9

Earlier quoted context omitted.

Python 3.12 also does not exist, because it has not been finished and released yet. So there's time.

"my wife is pregnant but my kid doesn't exist yet" hmmm

"Your kid doesn't have fully functioning limbs!"

"Yeah, but my wife is only two months pregnant"

Re: What's up in the Python community? – April 2023

#54
post #6

Earlier quoted context omitted.

I don't know why it is, but 3.10 and 3.11 are considered stable (and I would suggest you use 3.11 if you can).

I would not use 3.11 yet. I’ve had lots of issues with packages not supporting it and other headaches that still need to be ironed out. I’ve had no issues with 3.10.

Well yes you have to make sure all your requirements support it. 3.11 is stable tho.

Re: What's up in the Python community? – April 2023

#55
post #49
post #6

Earlier quoted context omitted.

I don't know why it is, but 3.10 and 3.11 are considered stable (and I would suggest you use 3.11 if you can).

I was just looking into this earlier. A lot of major packages have explicitly stated 3.11 readiness, but we're still only at 45% of the top 360 packages. That's not to say the remaining 55% are broken on 3.11, just tread with caution. For comparison, 71% explicitly support 3.10. https://pyreadiness.org/3.11/

It's a good point, but doesn't imply 3.11 is not stable. But could be an answer as to why Amazon doesn't support it.

Re: What's up in the Python community? – April 2023

#56

Earlier quoted context omitted.

So weird - you really think AI/ML is a flash in the pan when it comes to Python? You realize pytorch, tensorflow, pandas, numpy, scikit-learn are all approaching 10 years on pypi?

Yeah all the stuff I was seeing seemed to be variations and light wrappers around openai APIs and such. We don't need a million versions of those things, one or two clear 'winners' should emerge. You can see them here, expand it to 50 per page and start browsing down after the usual suspects: https://awesomepython.org/

In a language that has a million incompatible and partial solutions to packaging?

Re: What's up in the Python community? – April 2023

#57
post #52
post #10

Earlier quoted context omitted.

It’s that a lot of the libraries take a while to catch up. 3.10 is pretty good to use lately with PyTorch and numpy, which I mention because they are usually the main stragglers I have to track. They are both compiled with your friendly local architecture’s stack. Pydantic and FastAPI almost fell over because of changes to annotation handling, but woosh. That drama was forestalled. I think the python 3.3+ series has…

As is, it appears to mostly be: major version = backwards compatibly break minor version = forward compatible break I think this is how it has always been, in general. I've seen many new people very confused by python 3 code not running with "python3". The very embarrassing answer is "You can't really know what the minimum python version unless it's documented, or you scan it with an external tool". Is there a reason…

Code that works in 3.6 but not in 3.5 is fine within typical compatibility definitions. That said, Python nowadays deprecates things quite often (especially things in the standard library), so if Python wanted to adopt a “major = incompatible” scheme, it would probably go up to Python 10 or so.

Re: What's up in the Python community? – April 2023

#58
post #23

Earlier quoted context omitted.

Python has exploded in popularity over the past ~7 years because of AI. Python’s ever increasingly relevance is directly tied to AI.

And Flask, and FastAPI, and pandas, and pola.rs, and numba, and as glue code, and.... "AI" is pretty narrow, but the python ecosystem is massive, which a strong incumbency in the data processing space. Weird, since it i̶s̶n̶'̶t̶ ̶a̶ ̶t̶y̶p̶e̶d̶ is a dynamically language, where sometimes placeholders like pandas `object` result in unexpected behavior, but it sure is simple to write something quick.

Sure. Python isn’t going away. But Python has tripled in popularity over the past 7 years and a very very large portion of that growth is due to AI, imho. [1]

So, will a given AI Python package be popular in a year or three? Maybe, maybe not. Will the top Python packages be AI related in 3 to 5 years? Absolutely, imho. I’d definitely take that bet.

[1] https://insights.stackoverflow.com/trends/?tags=java%2Cc%2Cc...

Re: What's up in the Python community? – April 2023

#59

Earlier quoted context omitted.

If you're really alright with a few minutes delay, you might be able to run =<13b param. models on CPU

Any particular project that's prebuilt to not throw "out of ram" errors for it? I just want to play around with things without the restrictions ChatGPT. The OpenAI API is much less restrictive but can get pricey fast if I want quality above the lowest tier, at least for hobbyist purposes. I ran up a $10 charge in a few hours-- that's what I had budgeted for playing with a new "toy". It get's very tedious prompt engin…

What do you mean by "quality above the lowest tier"? ChatGPT-3.5 is the cheapest of their models right now, and it's also generally the best of all the 3.x ones, although the older GPT-3 models can sometimes beat it on non-task-oriented stuff (like long compositions).

Re: What's up in the Python community? – April 2023

#60
post #43

Earlier quoted context omitted.

None of the models out in the open really have GPT-3-ish capabilities, not even llama-65b. That aside, https://github.com/ggerganov/llama.cpp is the best option given the constraints that you describe. However, you will still need considerable amount of system RAM for larger models - 20 Gb for llama-30b, 40 Gb for llama-65b. Swap is an option here, but performance with it is abysmal. These things are huge, and I don'…

What about something that's maybe more along the lines of a GPT-2.5?

Of the small models, Vicuna and WizardLM seem to be the best of what's available right now. Quantized 7B models are just under 4 Gb of RAM, so they should fit on most GPUs out there; and even if not, they're "fast enough" on the CPU. But if you have enough RAM to run vicuna-13b (12 Gb should do it quite nicely), I'd start there.
Post reply on HN