How to Move Independent Work Through an asyncio Pipeline
A practical asyncio workflow for moving independent work through typed events, queues, concurrent tasks, and awaited API calls. Learn where validation and fallback belong.
Loading…
Topic
250 posts about Python. Every summary links to the original.
See the idea
A practical asyncio workflow for moving independent work through typed events, queues, concurrent tasks, and awaited API calls. Learn where validation and fallback belong.
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Pointing a standalone OpenTelemetry SDK directly at Sentry ingests spans over standard OTLP, but the spans remain disconnected from Sentry error data. Because the separate SDKs share a process without sharing context, Sentry errors lack active OpenTelemetry trace and span IDs. Sentry introduced OtlpIntegration across backend SDKs including Python, Ruby, Node.js, Go, PHP, .NET, and Java to bridge this gap. The integration reads the active OpenTelemetry context, attaches trace and span identifiers to Sentry events, and configures ingestion. This decoupled model replaces the deeply integrated POTel strategy across most languages, except Java, removing mandatory OpenTelemetry dependencies while maintaining unified trace waterfalls.
Autonomous vehicle development typically relies on disjoint models for trajectory generation, intent prediction, scene understanding, and data labeling. NVIDIA Alpamayo 2 Super addresses this fragmentation with an open 34-billion-parameter vision-language-action model that couples a 32-billion-parameter Cosmos 3 Super Reasoner with a 2-billion-parameter diffusion-based Action Expert. Processing surround-view video across up to seven cameras, the model simultaneously produces future vehicle trajectories, Chain-of-Causation reasoning traces, high-level meta-actions, and grounded scene question answers. In benchmark evaluations, the model achieved a 6.4-second minADE_6 of 0.911 meters on the Physical AI AV Dataset and ranked first on LingoQA with a score of 79.2. Released under the OpenMDW-1.1 permissive license, the architecture serves as an offline policy teacher, evaluation critic, or auto-labeling engine that can be distilled for NVIDIA DRIVE AGX Thor deployment.
NVIDIA released nvmath-python v1.0 to give Python users direct access to CUDA-X math libraries without requiring low-level C or C++ interfaces. The library acts as an abstraction layer over GPU engines like cuFFT and cuBLASLt, CPU backends like NVPL and Intel MKL, and distributed libraries such as cuBLASMp. It interfaces directly with NumPy, CuPy, and PyTorch tensors, structuring routines into generic interfaces for broad interoperability and specialized advanced modules for hardware-specific optimizations. Users can define custom sparse formats with Universal Sparse Tensors or invoke compiled device APIs directly inside custom numba-cuda kernels. Built-in logging captures execution space decisions and flags potentially expensive memory transfers across host and device environments.
Healthcare robotics faces data scarcity, long-tail clinical scenarios, and multi-year development cycles due to reliance on physical phantoms and animal studies. To resolve this, NVIDIA Medical Physics Simulation introduces GPU-native simulation within NVIDIA Isaac for Healthcare, integrating classical physics solvers and generative world models on a single GPU. The Endoluminal Simulation Module models flexible instruments as Cosserat rods solved via globally coupled extended position-based dynamics, maintaining zero-copy PyTorch interoperability via NVIDIA Warp. Concurrently, Cosmos-H-Dreams leverages distilled video diffusion models via the FlashDreams runtime to stream action-conditioned surgical video at over 30 frames per second. This dual-track architecture enables synchronized physics, synthetic fluoroscopic rendering, and scaled reinforcement learning policies across hundreds of parallel GPU environments.
Flask web applications require dedicated mechanisms to authenticate users securely and authorize access to downstream services. Developers can address this by integrating Okta as an OpenID Connect identity provider using the Authlib library. Authlib registers Okta as a remote provider and automates the Authorization Code flow using Proof Key for Code Exchange with SHA-256 code challenge verification. After logging in through Okta and completing the callback route, the Flask web application uses the acquired OAuth 2.0 access token to query a protected backend resource server. This architecture ensures that user credentials remain managed by Okta while client requests to backend API endpoints carry valid, scoped authorization tokens.
NVIDIA Labs released NVIDIA Labs Object-Oriented Agents (NOOA), an open-source research preview treating AI agents as single Python classes. The harness implements six model-facing capabilities: typed inputs and outputs, passing live objects by reference, code-based actions, programmable loops, explicit object state, and model-callable harness APIs. Instead of context compaction, passing live references keeps transcripts append-only, preserving prompt cache validity across long sessions. NOOA also includes a curated SQLite-backed long-term memory system forming a typed knowledge graph. Across evaluations, NOOA achieved 82.2 percent on SWE-bench Verified with GPT-5.5 using roughly 1.1M tokens per task, 86.8 percent on CyberGym L1 without network access, and 85.1 percent mean RHAE on ARC-AGI-3 using GPT-5.6-sol at under twenty dollars per game.
Adapting open models to specialized tasks often requires significant infrastructure, technical expertise, and GPU resources. This tutorial demonstrates how developers can customize NVIDIA Nemotron 3 Nano using Prime Intellect Lab for hosted reinforcement learning with verifiable rewards. The workflow establishes a baseline evaluation on a Python Math task, trains a LoRA adapter using a TOML configuration, and reevaluates performance. Across 32 held-out problems capped at five assistant turns, the model improves its accuracy from 21.9% to 90.6% for less than five dollars in compute spend. The same hosted training approach applies to larger models in the family, including Nemotron 3 Super and Nemotron 3 Ultra.
Modern diffusion transformers running in BF16 often require 20–30 GB of VRAM, limiting access on consumer GPUs; the integration brings Nunchaku Lite checkpoints into Diffusers to reduce memory and denoising latency. SVDQuant handles activation outliers by moving them into weights, preserving a small 16-bit low-rank branch while quantizing residual weights to 4-bit, enabling W4A4 compute in transformer attention and MLP projections. Nunchaku Lite patches standard nn.Linear modules at runtime, loads Hub-hosted CUDA kernels through the kernels package, and exposes ordinary from_pretrained() loading without local compilation; AWQ W4A16 handles modulation and normalization projections. On an RTX 5090, the cited NVFP4 checkpoint generates 1024×1024 images in about 1.7 seconds at roughly 12 GB peak memory versus about 24 GB for BF16, while the bare-bones Nunchaku Lite path delivers around 30% speedup; torch.compile raises reported end-to-end speedup from 1.35x to 1.8x.
Long-running NVIDIA TensorRT engine builds can freeze workflows and waste GPU hours when they lack visibility or abort mechanisms. Developers can resolve this by subclassing the IProgressMonitor API in Python or C++ and attaching it to the builder configuration. The monitor tracks hierarchical build phases through start, step completion, and finish callbacks, requiring thread synchronization because TensorRT calls monitor methods across internal builder threads. Returning false from the step completion callback requests early build cancellation, which unwinds active phases in reverse order at the next step boundary. Beyond terminal rendering with ANSI escape codes, teams can stream these progress events to IDE protocols, HTTP service endpoints, or agent tool-call traces.
Thumbtack developed a transformer-based category recommender to personalize email and push notification suggestions across roughly 500 home service categories. Because user activity is sparse while contextual signals like location and climate are rich, the architecture represents search history and context features as sequences of tokens evaluated against candidate category tokens using cross-attention. Initial training with naive cross-entropy suffered from severe popularity bias, skewing recommendations toward head categories and yielding a low tail hit rate. To resolve this issue, the team implemented adaptive mixed sampling, combining in-batch and random negative candidates and keeping only top-scoring hard negatives for cross-entropy loss computation. This method raised tail hit rate from 2.1% to 28.4%, improved overall HR@10 to 54.6%, and yielded a statistically significant 5% lift in requests per user in production A/B testing.
NVIDIA Omniverse libraries, included in NVIDIA Agent Toolkit, provide modular components for incorporating physical AI features into current tools and services. As part of this stack, the ovrtx prerelease library offers a lightweight C and Python SDK for real-time RTX sensor simulation and visualization using OpenUSD scenes. Host applications retain architectural and workflow control by stepping the renderer directly from their internal loops. Integration relies on ovstage for shared OpenUSD data management alongside RenderProducts and RenderVars to configure camera, lidar, radar, and semantic segmentation outputs. PTC Onshape Render Studio is exploring ovrtx to embed RTX rendering directly into cloud-native CAD and PDM workflows.
Apache Spark 4.2 extends the engine’s role in modern data and AI workloads with governed metrics, vector and top-K primitives, Arrow-first Python execution, native change data capture, and stronger streaming foundations. Metric views provide shared business definitions, while Spark Connect uses gRPC and Arrow to let remote clients submit logical plans without a full Spark runtime. Spark SQL adds vector similarity functions, NEAREST BY, geospatial types, sketches, and time-series features; Python interoperability includes Arrow UDFs and can move Spark DataFrames into supported Arrow-native tools without copying or serializing underlying data. Spark Declarative Pipelines adds Auto CDC for SCD Type 1 targets, while Data Source V2 standardizes change streams through CHANGES and expands row-level operations and schema evolution. The release also includes operational updates such as Web UI modernization, Kubernetes improvements, JDK 25 support, and dependency upgrades.
Setting up reinforcement learning workflows and running repetitive experimentation often consumes significant engineering time before meaningful metrics emerge. To address this, an autonomous autoresearch workflow uses a frontier coding agent running Codex with GPT 5.5 to manage NVIDIA NeMo RL and NeMo Gym on an NVIDIA Brev GPU instance. The agent executes full-stack setup, creates a novel NeMo Gym visual counting environment, tunes Qwen3-VL-2B-Instruct accuracy from 25.0% to 96.9%, and implements an off-policy reinforcement learning algorithm directly from a research paper. Reusable skills, including brev-etiquette, session-memory, and autoresearch, enforce local conventions and prevent context drift during long executions. This setup offloads environment configuration, dependency resolution, and experiment tracking while preserving human oversight for goals and strategy.
Yelp developed Training Orchestrator to standardize machine learning pipeline execution and eliminate divergent training scripts across its applied engineering teams. Previously, monolithic Spark scripts coupled training logic directly to cluster runtimes, preventing local testing, slowing debug cycles, and causing inconsistent configuration drift across projects. The new framework introduces a declarative configuration layer backed by Pydantic models, enabling static type checking and step schema validation before runtime execution starts. Training workflows are defined as modular step hierarchies that the orchestration engine compiles into directed acyclic graphs for execution in topological order. By injecting Spark and MLflow contexts into steps, the architecture ensures reproducible tracking, automated Slack alerts, and parity across local development and production environments.
Fault-tolerant quantum computing requires effective quantum error correction, but color codes have historically been constrained by difficult decoding demands. NVIDIA introduced the Ising Decoder ColorCode 1 Fast, a pre-decoder designed to accelerate and improve color code logical error rates. The framework uses a 3D Convolutional Neural Network trained via cuStabilizer in NVIDIA cuQuantum alongside PyTorch to handle localized error syndromes. In benchmark testing at code distance d=31 with a 0.3% physical error rate, the decoder achieved over 347.7x lower logical error rates and 7.3x faster runtime compared to the Chromobius decoder. These local, space-time predictions scale to arbitrary distances, supporting parallel blockwise decoding for real-time quantum algorithm execution.
Estimating the likelihood of extreme, high-impact events using brute-force Monte Carlo simulations requires excessive model iterations for expensive physics-based climate models. While guided diffusion models steer generation toward rare events like tropical cyclones, oversampling distorts the true probability distribution. To address this, researchers guide the diffusion-based climate emulator NVIDIA cBottle toward specific events and compute log-odds ratios between guided and unguided distributions. Reweighting the guided samples via these odds ratios enables importance sampling under the original climate distribution. Implemented in NVIDIA Earth2Studio, this technique reduced standard error by 25% compared to simple Monte Carlo sampling when evaluating tropical cyclone states.
Python app hosting is presented as both an infrastructure choice and, for data-intensive or AI applications, a data-architecture choice. The guide defines a hosting stack comprising application code, runtime, dependency manager, application server and reverse proxy, and contrasts it with traditional web hosting. It compares shared hosting, VPSs and cloud VMs, PaaS, container platforms and serverless functions by control, operational effort, scalability and workload fit. It notes that long-running data and AI tasks such as model training, vector indexes, cached datasets, ETL jobs and lengthy inference pipelines can exceed practical serverless limits. The conclusion is that public APIs and lightweight web apps allow broad platform choice, while apps accessing governed data, model endpoints or AI agents should be evaluated by where data lives and how access is governed, with Databricks Apps presented as an option when data already resides in a lakehouse.
Large language model training workloads frequently face GPU high-bandwidth memory (HBM) capacity constraints before compute limits are reached. To alleviate this memory pressure in JAX training workloads, host offloading transfers selected forward-pass activations to pinned host memory over high-speed NVLink-C2C interconnects and reloads them during the backward pass instead of recomputing them. Benchmarks executed on 128 GPUs within NVIDIA GB200 NVL72 systems using MaxText demonstrated significant improvements. For DeepSeek-V3 671B, host offloading combined with the Latency Hiding Scheduler and pipelined offloading reached 908.2 TFLOPs/s/device, surpassing activation rematerialization throughput by 57% and unlocking larger batch configurations. Similarly, QKV activation offloading on Llama 3.1 405B achieved a 2.9% throughput increase when transfer latency was hidden behind computation.
GPU compute often outpaces memory bandwidth, causing separate kernels to suffer from intermediate global memory round-trips and launch overhead. Kernel fusion resolves this by executing multiple operations within a single kernel to keep intermediate data inside registers. Using the sum(abs(x)) operation as a benchmark on an NVIDIA GeForce RTX 4090, a naive two-kernel setup moved 3 GB of global memory over 3.51 ms. In contrast, manual CUDA C++ fusion, PyTorch compiler fusion via torch.compile, and explicit Python fusion using cuda.compute all achieved a 3x speedup. Across all three approaches, global memory transfers dropped to 1 GB by computing absolute values inline during reduction.
The tutorial shows how to create and validate a LangChain Deep Agents harness profile for NVIDIA Nemotron 3 Ultra using an evaluation benchmark rather than fine-tuning the model. It starts with a baseline, analyzes failed trajectories, and iterates on prompts, exclusions, or added middleware while rerunning tests to detect regressions. One failure occurred when read_file returned the first page of a large file without signaling that more content existed, so the model answered before paginating to the line containing opal-fox-91. The proposed ReadFileContinuationNoticeMiddleware appends a continuation notice when a full page is returned, raising the reported benchmark score from 94/127 to 96/127 and resolving all three read_file tests. The source also describes automating this propose, verify, and retain-or-reject loop, with safeguards against overfitting and regressions.
The best engineering reads, once a week.