pythondaily | Education

Telegram-канал pythondaily - Python Daily

2571

Daily Python News Question, Tips and Tricks, Best Practices on Python Programming Language Find more reddit channels over at @r_channels

Subscribe to a channel

Python Daily

How I’ve understood Post-Transformer AI + how BDH, Mamba and RWKV handle memoryD

First off, the term itself is a little vague. Transformers are still the underlying architecture for most LLMs and reasoning models. Post-Transformer AI is more of an umbrella term for newer model designs that rethink how LLMs process information. Some replace full attention with a running memory that updates as the model reads, while hybrid approaches keep attention in some layers and use a different mechanism in others. Which design makes sense depends on what you need the model to do.

Let's take a simple example. Imagine receiving two texts about the same movie:

"It starts at 6."

Later:

"Actually, it starts at 8."

What time should you show up? 8. What time did the first text say? 6. A model might get the first question right even after it has lost the answer to the second.

You could simply write down both times. That's easy enough if you know what someone might ask. But what if they ask about a completely different detail from the first text?

With full attention, a model can look back at earlier positions as long as they're still in context. However, this requires storing key and value data for each previous position, so the cache grows with the conversation. Many attention alternatives instead maintain a fixed-size memory, which means deciding what to keep and what to let go of. Let's look at a few approaches here.

Pathway's Dragon Hatchling (BDH) uses a fast working state that strengthens associations between active features as it reads. Its learned weights also hold parametric memory, and those weights stay fixed during the reported inference. In BDH-CQ, a puzzle-solving variant, worked examples update the fast memory. For a new puzzle, a separate internal workspace lets the solver refine an answer over several passes. The memory holds what the examples showed, while the workspace is where it works on the new puzzle. Transferring useful changes from fast state into slow weights is a future research direction, not a demonstrated way to carry a new rule across fresh sessions.

Mamba and RWKV-7 both carry a running state. Before BDH, Mamba and RWKV were already promising early approaches in the post-Transformer space. In both cases, each new input helps determine how the state gets updated, but its size stays fixed as the conversation grows. By the time you ask about 6, enough information to recover the original time has to have survived those updates. RWKV-7 also maintains a fixed-size state, but uses a different rule to decide what to keep or overwrite as it reads.

AI21's Jamba-1.5 takes a hybrid approach, using one attention layer for every seven Mamba layers. This means some layers can still look back at individual positions in the log. The 1:7 ratio is specific to that design.

Moonshot's Kimi Linear is another hybrid. It uses three recurrent Kimi Delta Attention layers for every full attention layer. Both Jamba and Kimi retain some direct access to earlier positions, but their recurrent layers work differently.

Google's Titans offers another contrast. It's also a hybrid, using prediction error to update a separate neural memory during inference. That's a different update rule from Mamba's running state or BDH's fast associations.

I'd compare these Transformer successors and alternatives with full attention using made-up movie times. Add unrelated messages after the correction, check that the inputs fit without truncation, and ask each question on a fresh copy of the same chat. On the same hardware, I'd record peak memory and score the answers separately. Forgetting 6 and telling someone to show up at 6 are different failures.

Does anyone know a benchmark that asks both "what's the value now?" and "what was it before the correction?" on the same input and reports the two scores separately?



https://redd.it/1y66lpy
@pythondaily

Читать полностью…

Python Daily

of the level|clears it 94% of the time|
|Lives lost|19, mostly at the first Goomba||
|Size|35B parameters (3B active)|1.7M parameters|

Its thoughts were usually right. *“I see a Goomba ahead and need to jump over it to proceed safely.”* Then it chose a six-frame hop where a full jump was needed. It can describe the situation, but it can’t time it. The small network has never “understood” a Goomba; it has simply been in that spot hundreds of thousands of times. For a platformer, that turns out to be what matters.

The LLM earns its place as the coach. It reads statistics and screenshots and explains what’s going wrong in a sentence, which is useful, and with bounded actions it’s safe.

# Things I’d tell someone starting this

* **Give the network the information it needs** before tuning anything else. A few numbers from memory beat days of practice.
* **Grow networks instead of restarting them.** Zero-initialized new inputs keep everything learned.
* **Put hard limits on anything an LLM may change,** and log every change.
* **Write down the negative results.** Curiosity and “stay on the level” both looked obviously right.
* **Measure on a copy,** side by side, from the same checkpoint. Several of my “improvements” only showed their cost that way.

# How it was built

I built this with [Claude Code](https://claude.com/claude-code) as a pair programmer, over about 24 hours of hands-on sessions across five days. The ideas to try, the decisions, and the judgment of the results are mine. The code, the tests, and many of the measurements came out of working with it. Every change went through an issue and a pull request with its test results, all in the repository.

**Credit to the work this builds on:**

* SethBling’s MarI/O, the classic “AI plays Mario”;
* Chrispresso’s SuperMarioBros-AI, whose network diagram inspired the live one in my viewer;
* PPO (Schulman et al., 2017) and RND (Burda et al., 2018);
* stable-retro, the emulator I trained in.

*Super Mario Bros. is a trademark of Nintendo. This project isn’t affiliated with or endorsed by Nintendo, and it includes no game ROM.*

**Next:** the 2-1 interference problem, practicing from the game’s own respawn points, and a world-model learner (DreamerV3) as a challenger to PPO. Questions and ideas are welcome in the repo’s issues.

https://redd.it/1yalrk2
@pythondaily

Читать полностью…

Python Daily

Teaching a tiny network to play Super Mario Bros. on one Mac, with a local LLM as its coach. [P]

Over five days, I trained a small reinforcement-learning agent to play Super Mario Bros. on a single Mac. A local language model watched over the training and coached it. Everything runs on the machine: no cloud and no account. The code is open source under the MIT license: [github.com/thededman/ai-plays-mario](https://github.com/thededman/ai-plays-mario). No ROM is included, so bring your own.

Where it stands after about 64,000 training updates:

|Level|Clears from its start|
|:-|:-|
|1-1|94% (fastest 21.5 s)|
|1-2|82%|
|1-3|82%|
|1-4|91%|
|2-1|42%|
|2-2 (underwater)|about 20%|

Its best run from 1-1 cleared six levels in a row and reached 2-3.

This post covers what I’d want to know if I were starting the same project: the setup, three things that made a real difference, two that didn’t, and what happened when I let the LLM play the game itself.

# The setup

**The player** is a small actor-critic network trained with PPO. It has the classic Atari layout: three convolutional layers, one 512-unit layer, a head that scores 13 button combinations, and a head that estimates value. That’s about 1.7 million parameters.

* **It sees** four stacked 84×84 grayscale frames and decides every 4 frames, 15 times a second.
* **It also gets 34 numbers:** the move it just made, how long it has been holding jump (a longer hold jumps higher), and, as of day four, where the nearest enemies are. More on that below.

**Training** runs 8 emulators in separate processes (stable-retro) and updates the network on the Mac’s GPU (PyTorch on MPS).

* **Each update** uses 8 × 256 decisions: 4 epochs, 8 minibatches, learning rate 1e-4, γ = 0.95, λ = 0.95, clip 0.2.
* **That’s** about 1,000 decisions a second, or about 2,300 updates an hour.

**The curriculum** is every level in order, 1-1 to 8-4, with no warp pipes: the game played as a speedrun.

* The next level unlocks when the newest one clears 65% of its last 200 runs.
* Earlier levels keep getting tries, weighted by how often they still fail, so they aren’t forgotten.
* Half of all attempts start from save states just before the spots where full runs die most.

**Demonstrations:** I can take the controller and play a hard section. My play becomes training examples: a behavior-cloning term in the loss that pulls toward my moves. Its own fastest clears become examples too.

**The coach** is Qwen 3.6 35B-A3B, running locally in Ollama.

* **Every five minutes** it gets the training statistics and screenshots from just before recent deaths, and writes a short note in plain words.
* **It may then take a few actions:** point practice at a spot, raise or lower exploration, nudge a reward weight, or ask me to demonstrate something.
* **Every action is checked against fixed limits** before it runs.

# Three things that made a real difference

# 1. Reading the game’s memory beat reading pixels

The first overnight run ended with 2-2, the underwater level, cleared **once in about 22,000 tries**. The coach’s notes were accurate (“it keeps getting hit by fish in the water”), but no amount of practice helped.

The problem was what the network could see. In an 84×84 grayscale frame, a fish is a few gray pixels on a gray-blue sea, the same size as the coral. The game already knows exactly where every enemy is, in five slots in RAM.

So I gave the network **20 extra numbers:** the four nearest enemies’ positions relative to Mario, and how they moved since the last decision.

* **No retraining from scratch.** I grew the existing network in place: the new input weights start at zero, so on day one it played exactly as before, and it learned to use them on its own. I’d already grown it the same way once, adding new moves as copies of existing ones.
* **The result:** the next night, together with a fix to how practice was shared out that went in the same day, it cleared 2-2 **2,797 times in 34,591 tries**. The clear rate rose from 6% to 21% by morning and was still climbing.

# 2. Guardrails on the LLM coach

The

Читать полностью…

Python Daily

ReAct agent matches complex prompt optimizers at quarter cost [R]
https://redd.it/1yamipu
@pythondaily

Читать полностью…

Python Daily

why don't people use compute services like salad? D

hello. i was looking into how cheap compute services like salad is compared to other providers (nearly 60% in some cases) and was wondering why this type of compute hasn't had a mass adoption, or at least, why haven't i heard of it more often?


why aren't enterprises using it, or startups, or hobbiests? if you do or don't use it, im super curious as to why.

https://redd.it/1y9pt8z
@pythondaily

Читать полностью…

Python Daily

D Self-Promotion Thread

Please post your personal projects, startups, product placements, collaboration needs, blogs etc.

Please mention the payment and pricing requirements for products and services.

Please do not post link shorteners, link aggregator websites , or auto-subscribe links.

\--

Any abuse of trust will lead to bans.

Encourage others who create new posts for questions to post here instead!

Thread will stay alive until next one so keep posting after the date in the title.

\--

Meta: This is an experiment. If the community doesnt like this, we will cancel it. This is to encourage those in the community to promote their work by not spamming the main threads.

https://redd.it/1yanmku
@pythondaily

Читать полностью…

Python Daily

Lightweight Django monitoring without running Prometheus or Grafana
https://redd.it/1yaka8k
@pythondaily

Читать полностью…

Python Daily

Advent of Code 2026

# Join the Advent of Code Challenge with Python!

Hey Pythonistas! 🐍

It's that exciting time of the year again! The [Advent of Code](https://adventofcode.com/2026) has just started, and we're inviting everyone to join in the fun!

## What is Advent of Code?

Advent of Code is an annual online event that runs from December 1st to December 12th (or til the 25th for older years). Each day, a new coding challenge is released—two puzzles that are part of a continuing story. It's a fantastic way to improve your coding skills and get into the holiday spirit!

You can read more about it [here](https://adventofcode.com/2026/about).

## Why Python?

Python is a great choice for these challenges due to its readability and wide range of libraries. Whether you're a beginner or an experienced coder, Python makes solving these puzzles both fun and educational.

## How to Participate?

1. [**Sign Up/In**](https://adventofcode.com/2026/auth/login)**.**
2. Join the r/Python private leaderboard with code `2186960-67024e32`
3. Start solving the puzzles released each day using ***Python.***
4. **Share your solutions and discuss strategies with the community.**

## Join the r/Python Leaderboard!

We can have up to 200 people in a private leaderboard, so this may go over poorly - but you can join us with the following code: `2186960-67024e32`

## How to Share Your Solutions?

You can join the [Python Discord](https://discord.gg/python) to discuss the challenges, share your solutions, or you can post in the r/AdventOfCode mega-thread for solutions.

There will be a stickied post for each day's challenge. Please follow their subreddit-specific rules. Also, shroud your solutions in spoiler tags >!like this!<

## Resources

## Community

* [Python official Documentation](https://docs.python.org) for Python documentation.
* [r/LearnPython](https://www.reddit.com/r/learnpython/) for Python learning resources and discussions.
* [Python Discord](https://discord.gg/python) for Python discussions and help.

## AoC

* [2026 Leaderboard](https://adventofcode.com/2026/leaderboard/private)
* [AoC++](https://adventofcode.com/2026/support) to support the project
* [AoC Subreddit](https://www.reddit.com/r/adventofcode/) for general discussions
* [AoC Shop](https://advent-of-code.creator-spring.com/) for merch

## Python Discord

The [Python Discord](https://discord.gg/python) will also be participating in this year's Advent of Code. Join it to discuss the challenges, share your solutions, and meet other *Pythonistas*. You will also find they've set up a Discord bot for joining in the fun by linking your AoC account.Check out their [Advent of Code FAQ channel](https://discord.com/channels/267624335836053506/1047672643584786442).

Let's code, share, and celebrate this festive season with Python and the global coding community! 🌟

Happy coding! 🎄

P.S. - Any issues in this thread? Send us a modmail.

https://redd.it/1yaccue
@pythondaily

Читать полностью…

Python Daily

CMV: Paper authors should be allowed to insert prompt injections into their papers asking for a good score D

This essentially incentivizes the system to find a way to prevent reviewers from offloading all their reviewing, intellectual judgement, and scoring decisions to LLMs. Plus, if you get lazy reviewers, you get compensated with better scores. Win win

https://redd.it/1yaahul
@pythondaily

Читать полностью…

Python Daily

celery beat died after a deploy and nothing noticed it for 4 days

I'm running a small django app for the client. One VPS with docker compose gunicorn, a celery worker, celery beat, redis, postgres. Beat sends me the weekly invoice reminders and there's a night cron jobs that expires old trial accounts.

recently I changed the compose file to pin the redis version and redeployed but the beat container exited on start with a permission error on celerybeat-schedule because the volume got recreated owned by root also that one service had no restart policy (that's an old copy paste my fault). Worker and web running fine.

but then I found out on saturday when client asked why trial users from two weeks ago could still log in.

and the most annoying part is that my monitoring looked perfect the whole time. Dotcom Monitor logs in as a test user and loads the dashboard every few minutes which has been great for the web side but beat being dead doesn't change a single page. Sentry had nothing either since a task that never gets scheduled never throws.

I fixed the ownership put restart (unless-stopped) on everything and moved the schedule file to /tmp so it doesn't depend on the volume. What I still want is something that tells me when a periodic task hasn't run.

Options I'm thinking aboutis to setup a last_run row each task updates plus a small view that returns 500 when it's older than expected (then the outside check I already have can just watch that URL) also switching to django-celery-beat with the DatabaseScheduler or a healthchecks-style ping at the end of every task.

What are you doing for this? Is the last_run view reasonable or am I just reinventing something that already exists?

https://redd.it/1yabur6
@pythondaily

Читать полностью…

Python Daily

TMLR is changing their review process D

Full post

- All authors must explain how each paper fits their broader research agenda.

- TMLR will expect more ambitious projects and encourage interactive public-facing research artifacts. Anonymity restrictions for those artifacts will be relaxed.

- Some authors will be interviewed about their submissions before full review.

- They are rolling out an automated system (!!) that does the interview.

Sweeping set of changes that I beleive will make quite a few (senior) folks grumpy. But quite an strong and foward-looking statement that is much needed in the current research landscape imo.

https://redd.it/1ya8kym
@pythondaily

Читать полностью…

Python Daily

An explorable map of NeurIPS 2026: 882 research questions shared across ~9k papers [P]
https://redd.it/1ya2pmu
@pythondaily

Читать полностью…

Python Daily

I built a linter that catches Django migrations that would lock your tables in production

I maintain django-safe-migrations, and 0.8.1 just came out. It reads your migration files without a database and flags operations like building an index without CONCURRENTLY on PostgreSQL or changing a column type in a way that rewrites the table. Each finding suggests a safer way to write the migration.



In CI, --diff checks just the migrations changed on your branch. A baseline file lets you accept existing findings. If you want to start with one rule, ENABLED_RULES lets you choose which checks run.



Install with pip install django-safe-migrations, add it to INSTALLED_APPS, then run python manage.py check_migrations.



https://github.com/YasserShkeir/django-safe-migrations



What migration has bitten you in production? I'm collecting patterns for new rules.

https://redd.it/1ya26cd
@pythondaily

Читать полностью…

Python Daily

Interactive Machine Learning Course P

Hey everyone! 



Machine Learning can be an extremely unintuitive topic, therefore I've been working on an interactive ML basics course for the last few months to use in my teaching, with lots of interactive exercises and intuitive animations.



The course covers the math basics (calculus, linear algebra, probability) behind ML,

as well as a few central topics such as maximum likelihood, gradient descent and neural networks.



Perhaps this is something you might want to use in your own teaching as well (e.g. as supporting resources) or even yourself.



In the coming weeks and months I will also start recording the lectures I gave for our deep learning course and upload them there.



Here's the link: https://ml-crash-course.github.io



I'd be super grateful for any feedback, suggestions or bug reports, and if you find this useful also Github stars so that I know I'm on the right track with this.



Hope this helps!

https://redd.it/1ya04er
@pythondaily

Читать полностью…

Python Daily

why don't people use distributed compute for ML? D

hello. i was looking into how cheap compute services like salad is compared to other providers (nearly 60% in some cases) and was wondering why this type of compute hasn't had a mass adoption, or at least, why haven't i heard of it more often?

why aren't enterprises using it, or startups, or hobbiests? if you do or don't use it, im super curious as to why.

https://redd.it/1y9pxfg
@pythondaily

Читать полностью…

Python Daily

If I hear “first order approximation” one more time… you’re not being precise, you sound like an eejit.D

In the limit, in some sense, to a first approximation, finite time singularity,

I am a statistics/ml researcher. Whilst I have been skeptical of the AI safety view for a while, I have begun to try and engage with the work. However, the use of quite precise statements to discuss quite vague statements is driving me mental:
\- “in the limit” - in the limit of what? Data? Time? Generally which neither make sense in the context.
\- “in some sense” - generally when this is said, there is only one sense in which it is meant. You’re not making a statement with respect to some yet undefined measure.
\- “to a first order approximation” - this one is the buggy - what hell are you talking about? Is your statement differentiable?

This kind of stuff wouldn’t annoy me as much if it wasn’t coming from Bayesian Rationalists who seem to both miss understand the different between frequentist and Bayesian probabilities, abuse the interpretation of IID and seem to think that invoking formal mathematical statements makes there conclusions robust.

For examples see any Dwarkesh podcast or https://youtu.be/IlgvRtTwaUs?is=MLbcD9xeHCIdevYP

https://redd.it/1yath8l
@pythondaily

Читать полностью…

Python Daily

coach is useful because it can change things, and dangerous for the same reason.

* **Exploration:** in one early review, it raised exploration from 0.02 to 0.05. That’s a reasonable instinct for a stuck agent, but the extra randomness made the network forget a level it had mastered: 1-2 fell from 88% to 61%. Changes are now capped at 1.5× per review, within a fixed range.
* **Demonstrations:** studying my demonstrations at full strength once took 1-1 from 91% to 5% in minutes. Studying now uses its own optimizer, plus a term that keeps the network’s old answers on recently seen screens. That keeps 1-1 at about 92% while it learns to copy most of my moves.
* **Overnight:** on the first night the coach asked me for a demonstration 119 times while I was asleep. Now, overnight, it keeps a “wants your help” list for the morning instead.

The lesson I’d pass on: give an LLM real levers, but make every lever bounded and every change visible.

# 3. Fixing the curriculum’s sharp edges

Two curriculum rules caused trouble.

* **A lucky streak:** on the first night, 2-1 reached the unlock bar (then 60% of 100 runs) in a lucky window and unlocked 2-2. With most training moved to 2-2, 2-1 slid from 49% to 12% by morning. The bar is now 65% of 200 runs, and earlier levels get practice in proportion to how often they fail.
* **A level it can’t pass:** 2-2 then sat at about 20% for days, far below the bar, so 2-3 never opened. Now, if the newest level clears at least 15% but hasn’t improved for about 1.5 hours, the next level opens anyway, and the stuck one keeps half of the training until it reaches the bar. This one is fresh, and it has a cost I can already see: in a test, 2-1 dropped about 12 points once 2-3 opened, with no change in how often it was practiced. Learning a new level disturbs an older one. That’s the next problem.

# Two things that didn’t work

# Curiosity (random network distillation)

At the walls where the agent kept dying, it kept repeating the one thing it knew. Curiosity bonuses are the textbook answer. In random network distillation (Burda et al., 2018), a predictor network learns to match a fixed random network on the screens it has seen, and its error on a new screen is paid as a reward.

Getting the bonus to pay in the right places took three fixes, which may save someone time:

* **Compare errors with a decaying average,** not a running one. The predictor learns fast, so against its early, larger errors, every new screen looked familiar.
* **Use the log of the error.** A few unusual screens had errors 10 to 50 times the norm and swamped everything else.
* **Normalize per level.** The level being trained most is the one the predictor knows best, so with one global average, curiosity paid off on an older, less familiar level instead.

Then I ran two 45-minute A/B tests from the same checkpoint. **Curiosity didn’t help:** 2-2 clears were 15.6% and 16.3% with it, against 19.7% and 17.6% without. It’s parked as a draft.

# Staying on the level until it’s cleared

On screen, the agent plays whole runs with lives. I tried letting a run stay on a stuck level until it cleared it, instead of giving up after 10 lives. It got worse.

* **Why:** after a death, the game puts Mario back at the level’s midpoint, small, so every retry started from the same place. 49 of 50 deaths on 2-1 were at the same pipe.
* **The lesson:** training never practiced starting from that respawn point, so repeating it on screen taught nothing. I reverted it the same night.

# Letting the LLM play

People kept asking the obvious question: why not let the LLM play? So I added a button that does exactly that.

* **Each turn,** the model gets two screenshots a fifth of a second apart and the same enemy positions the network gets.
* **It answers** with a one-line thought, one of the 13 moves, and how long to hold it.
* **The game pauses while it thinks,** so it isn’t penalized for being slow.

Ten minutes on World 1-1:

||Qwen 3.6 35B-A3B (local LLM)|The PPO network|
|:-|:-|:-|
|Speed|314 moves at 1.0–2.3 s each|15 decisions a second|
|Result|40%

Читать полностью…

Python Daily

Teaching a tiny network to play Super Mario Bros. on one Mac, with a local LLM as its coach. P

Over five days, I trained a small reinforcement-learning agent to play Super Mario Bros. on a single Mac. A local language model watched over the training and coached it. Everything runs on the machine: no cloud and no account. The code is open source under the MIT license: github.com/thededman/ai-plays-mario. No ROM is included, so bring your own.

Where it stands after about 64,000 training updates:

|Level|Clears from its start|
|:-|:-|
|1-1|94% (fastest 21.5 s)|
|1-2|82%|
|1-3|82%|
|1-4|91%|
|2-1|42%|
|2-2 (underwater)|about 20%|

Its best run from 1-1 cleared six levels in a row and reached 2-3.

This post covers what I’d want to know if I were starting the same project: the setup, three things that made a real difference, two that didn’t, and what happened when I let the LLM play the game itself.

# The setup

The player is a small actor-critic network trained with PPO. It has the classic Atari layout: three convolutional layers, one 512-unit layer, a head that scores 13 button combinations, and a head that estimates value. That’s about 1.7 million parameters.

It sees four stacked 84×84 grayscale frames and decides every 4 frames, 15 times a second.
It also gets 34 numbers: the move it just made, how long it has been holding jump (a longer hold jumps higher), and, as of day four, where the nearest enemies are. More on that below.

Training runs 8 emulators in separate processes (stable-retro) and updates the network on the Mac’s GPU (PyTorch on MPS).

Each update uses 8 × 256 decisions: 4 epochs, 8 minibatches, learning rate 1e-4, γ = 0.95, λ = 0.95, clip 0.2.
That’s about 1,000 decisions a second, or about 2,300 updates an hour.

The curriculum is every level in order, 1-1 to 8-4, with no warp pipes: the game played as a speedrun.

The next level unlocks when the newest one clears 65% of its last 200 runs.
Earlier levels keep getting tries, weighted by how often they still fail, so they aren’t forgotten.
Half of all attempts start from save states just before the spots where full runs die most.

Demonstrations: I can take the controller and play a hard section. My play becomes training examples: a behavior-cloning term in the loss that pulls toward my moves. Its own fastest clears become examples too.

The coach is Qwen 3.6 35B-A3B, running locally in Ollama.

Every five minutes it gets the training statistics and screenshots from just before recent deaths, and writes a short note in plain words.
It may then take a few actions: point practice at a spot, raise or lower exploration, nudge a reward weight, or ask me to demonstrate something.
Every action is checked against fixed limits before it runs.

# Three things that made a real difference

# 1. Reading the game’s memory beat reading pixels

The first overnight run ended with 2-2, the underwater level, cleared once in about 22,000 tries. The coach’s notes were accurate (“it keeps getting hit by fish in the water”), but no amount of practice helped.

The problem was what the network could see. In an 84×84 grayscale frame, a fish is a few gray pixels on a gray-blue sea, the same size as the coral. The game already knows exactly where every enemy is, in five slots in RAM.

So I gave the network 20 extra numbers: the four nearest enemies’ positions relative to Mario, and how they moved since the last decision.

No retraining from scratch. I grew the existing network in place: the new input weights start at zero, so on day one it played exactly as before, and it learned to use them on its own. I’d already grown it the same way once, adding new moves as copies of existing ones.
The result: the next night, together with a fix to how practice was shared out that went in the same day, it cleared 2-2 2,797 times in 34,591 tries. The clear rate rose from 6% to 21% by morning and was still climbing.

# 2. Guardrails on the LLM coach

The

Читать полностью…

Python Daily

AAAI 2027 Main Track Decisions Thread D

We are coming closer to the day of final decisions in 2 days. I hope many of us get through it positively. ICML and ICCV are also coming up, we can resubmit if we don't make into AAAI. Wishing everyone all the best and a healthy discourse in this thread :).

https://redd.it/1y710c0
@pythondaily

Читать полностью…

Python Daily

Would you consider a second PhD to pivot into a more industry-relevant ML research area? D

Hypothetically, suppose you have a PhD with a strong publication record, including two first-author papers at NeurIPS/ICML/ICLR and several other A-ranked publications. However, your research area is quite niche, with little industry demand, even among big tech companies and frontier AI labs.
Assuming your primary goal is to land an industry research position, how would you proceed? Would you consider a second PhD in a more relevant area, pursue a postdoc to pivot, or take an entirely different approach?

https://redd.it/1ya2ove
@pythondaily

Читать полностью…

Python Daily

Travel to Sydney for Neurips D

Hi researchers, just got my AU visa to attend neurips in Sydney. I'm travelling from India. Would love to connect with fellow researchers for accommodation sharing or pairing up to explore the city 😀...

https://redd.it/1ya5ga9
@pythondaily

Читать полностью…

Python Daily

D Simple Questions Thread

Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!

Thread will stay alive until next one so keep posting after the date in the title.

Thanks to everyone for answering questions in the previous thread!

https://redd.it/1ya71qy
@pythondaily

Читать полностью…

Python Daily

EEG "foundation models" after two years: scaling signal, or just another benchmark zoo? D

Disclosure: I am the PI of an EEG + ML research project (CURATOR, FNR-funded, run by my neurofeedback clinic, Neurofeedback Luxembourg, with the University of Luxembourg). This is a discussion post, there is nothing to sell, and I am not linking my own work.

Quick map of the field, because I think the pattern is interesting from an ML point of view:

- BIOT (arXiv:2305.10351): per-channel tokenisation into "biosignal sentences", handles mismatched channels, variable length and missing values.
- LaBraM (arXiv:2405.18765): channel patches + VQ neural tokenizer, masked code prediction, ~2,500 h from ~20 datasets.
- NeuroLM (arXiv:2409.00101): EEG tokens into an LLM, instruction tuning, 1.7B params, ~25,000 h.
- CBraMod (arXiv:2412.07236): criss-cross transformer, separate spatial and temporal attention.

What the evidence says so far:
- OmniEEG-Bench (arXiv:2606.00815, 54 datasets, 10 models) reports that pretraining-data diversity and model size are associated with better average rank, i.e. a scaling-law-like trend.
- EEG-Bench (arXiv:2512.08959, 14 datasets, 11 clinical tasks): simpler models are often competitive, especially under distribution shift.
- A generic time-series foundation model, even pretrained on synthetic data, beat CBraMod on motor imagery and sleep staging in one study (arXiv:2510.27522).
- A reproduction effort (EEGDash, arXiv:2611.06356) rebuilt a 77-dataset, 14,075 h public pretraining corpus; frozen linear probing matched the released model within seed spread, but fine-tuned numbers fell short of published ones, partly due to the scoring pipeline.

My read: the data and evaluation plumbing is the bottleneck, not the architecture. Channel handling alone is unsettled (arXiv:2604.23091: fixed/native mappings best in 18 of 25 model-task cells).

What would you want to see before believing an EEG model is a real foundation model rather than a strong baseline on BCI-style tasks? Linear-probe protocols, OOD clinical sets, something else?

https://redd.it/1yaf2sh
@pythondaily

Читать полностью…

Python Daily

Deploying Django on a small PaaS: migrations, collectstatic, gunicorn workers and Celery. What would you have done differently?

Disclosure: I work on Faable, a small PaaS (not linking it). Django is one of the stacks we detect and run without a Dockerfile, and a few of the defaults we picked are ones I keep second-guessing. I'd like to hear how people who run Django in production handle them.

1. Migrations don't run on deploy. We left migrate out of the release on purpose: you run it as a one-off task against the live environment when a release needs it. The cost is obvious. Sooner or later someone ships code that expects a column that isn't there yet. Do you run migrate in a release phase, in the container entrypoint, or by hand? And if it's automatic, do you keep migrations backwards-compatible (add first, remove one release later) or just accept a few seconds of errors?

2. collectstatic runs at build time, and a failure doesn't fail the build. If it breaks, the build carries on without staticfiles/ and logs it. We did that because a missing env var in settings would block an otherwise fine deploy. What you get instead is a site with no CSS and a green deploy, which is arguably worse. Would you rather the build failed?

3. One gunicorn worker on the smallest instance. At 512 MB, two workers of a Django app with a few heavy imports get OOM-killed, so if the start command asks for --workers 2 --threads 4 we run it as --workers 1 --threads 8 and say so in the log. Threads share memory, but you have to think about DB connections per thread and code that isn't thread-safe. Do you use gthread with Django in production, or go async/uvicorn, or just pay for the RAM and keep sync workers?

4. No Celery in the same app. A background worker is a second app from the same repo with its own start command, and periodic jobs are cron schedules that run a management command in a separate instance, even while the web app is asleep. For small projects that covers most of what people use Celery + Redis + beat for. Have you dropped Celery for cron + management commands (or django-q, Huey, the new tasks framework) on small projects, and where did that stop being enough?

I'm mostly interested in what bit you in production, not in which host is best.

https://redd.it/1ya9d7t
@pythondaily

Читать полностью…

Python Daily

ty 1.0 is now out: Astral's Rust-based type checker and language server is now stable

https://astral.sh/blog/ty-1.0

Astral just announced ty 1.0. It's a type checker and language server meant as an alternative to mypy/Pyright/Pyrefly.

The benchmarks look really good and it has support for Pydantic, Django, pytest, and attrs and seems to have less false positives/negatives vs mypy.

Has anyone tried it on a real codebase? Will this be the new default type-checker that everybody will use?

https://redd.it/1yaap9k
@pythondaily

Читать полностью…

Python Daily

Welcome Our Executive Director
https://www.djangoproject.com/weblog/2026/dec/01/welcome-our-executive-director/

https://redd.it/1ya4ap3
@pythondaily

Читать полностью…

Python Daily

Welcome Our Executive Director
https://www.djangoproject.com/weblog/2026/dec/01/welcome-our-executive-director/

https://redd.it/1ya498m
@pythondaily

Читать полностью…

Python Daily

Did anyone here attend interview recently?

Wanted to figure out how interviews might be. I am an experienced Django dev. Not sure leetcode is relevant anymore. Also not sure if Django concepts are focused on.

Any inputs would be great. Please share your thoughts.

https://redd.it/1ya18ys
@pythondaily

Читать полностью…

Python Daily

Feature engineering for mixed-type time-series anomaly detection P

I have time-stamped results from a set of checks. Each row includes a check name, a response value, and a creation time. Responses vary in type and scale: counts, decimal values, percentages, ratios, and dates.

I’m using Isolation Forest to detect anomalies. I convert responses to numeric values with type-specific handling: percentages become proportions, large values are log-scaled, some counts are normalized by a related row count, and date responses are converted to numeric time-based values.

I’ve tested three feature-set variants: 32 features (numeric, ratio, time, frequency-encoded, and binary features; no one-hot encoding), 38 features (the 32 base features plus six check-family one-hot features), and 43 features (the 38 features plus five metric-type one-hot features).

The additional features describe recent behavior (previous-result changes, rolling deviations, robust historical deviation, range breaks, and volatility), check and table context (row-normalized values and related-check behavior), timing and history (execution gaps, weekday, history length, and baseline availability), and category frequency.

False positives and false negatives remain high across the variants. I’m looking for general advice on validating whether engineered features represent useful signal, identifying redundant or noisy features, and evaluating feature sets for Isolation Forest.

What approaches would you recommend?

https://redd.it/1y9zuhr
@pythondaily

Читать полностью…

Python Daily

🚀 PSP (Python Scaffolding Projects) v0.11.0 Released!
https://redd.it/1y9wo8b
@pythondaily

Читать полностью…
Subscribe to a channel