Python for AI/ML Production | LaunchFar Academy
← Back to courses Free Interactive
Python for AI/ML Production with LaunchFar AI
10 weeks 180 lessons
Production Python for AI and ML engineering: 180 hands-on challenges across 61 modules, from the runtime and core data structures through comprehensions, generators, regular expressions and a staged capstone build, every one of them running in your browser. Built for developers and data practitioners moving into AI engineering. Personalized to your skill level so you only see the modules you actually need.
Syllabus
9 tracks · 61 modules · 180 lessons
Python Fundamentals 10 modules · 36 lessons
1. Runtime and first steps Meet the runtime 6 min First signals to stdout 4 min Comments and multi-line output 7 min 2. Variables and types Naming the pipeline's knobs 5 min Rebinding config mid-run 6 min The core types in a trace record 5 min type() checks before the cast 6 min 3. Numbers and math Cost math and precedence 6 min Batching tokens with // and % 5 min 4. Strings and text Start this course LaunchFar is invite-only during the beta. Join the waitlist to get your spot — the first 250 members get our first course free.
Join the waitlist Indexing into model IDs
5 min
Slicing prompt prefixes 5 min
Assembling log lines with f-strings 6 min
Clean, split, join the raw log 8 min 5. Conditions and branching Threshold checks 4 min Compound guard clauses 5 min The three-way branch 7 min Routing requests by score band 7 min 6. Loops and iteration Walking the trace batch 6 min Polling until the job settles 4 min Early exit on the poison record 5 min Numbered log lines with enumerate 4 min 7. Functions and scope The first helper 4 min Parameterising the trace helper 5 min Returning results (and more than one) 7 min Sensible defaults for model params 7 min Where names live: scope without surprises 8 min 8. Error handling Catching the flaky call 4 min Catching only what you mean 5 min Raising your own errors, cleaning up always 8 min The parser that refuses to crash 7 min 9. Input, output and files Reading operator input 5 min Casting the raw string 5 min Persisting the run log 8 min Paths as objects 7 min 10. Modules and imports import styles, aliases, namespaces 6 min Split the helper into its own file 8 min Data Structures & Iteration 11 modules · 37 lessons
11. Lists Building the routing service's allow-list 4 min Picking a model out of the routing list 4 min Adding a new model to the routing list with `.append()` 5 min in-checks and len on the batch 5 min 12. Dictionaries Looking up a per-tenant config value by key 4 min Adding a new model entry to the per-tenant config 4 min Iterating a per-model price dict for the cost report 4 min 13. Tuples, sets and None Reading an immutable allow-list snapshot tuple 4 min Deduplicating a model-name list with a set 5 min Marking a not-yet-rated trace with `None` 3 min Guarding the cost aggregator against not-yet-set scores 4 min 14. Comprehensions Building a list of squared latencies in one expression 4 min Filtering high-latency calls with a comprehension `if` 4 min Squaring only the even-indexed traces in one pass 4 min Inverting the model-price table 7 min 15. Nested data Walking a list of trace dicts to extract names 4 min Walking a per-tenant config's list of allowed models 4 min Rollup aggregations 5 min 16. Iterators and generators iter/next on the trace stream 6 min Lazy pipelines in one line 6 min yield-ing tokens one at a time 7 min Chained generators as a streaming ETL 8 min 17. collections and itertools Counter for token frequency tables 6 min Grouping traces by model 6 min The sliding context window 6 min islice, chain, groupby on batches 8 min 18. Sorting and searching Ranking retrieval hits by score 7 min Binary search and top-k without sorting twice 7 min 19. Regular expressions Finding the model name in the log line 7 min Extracting structured fields from raw text 7 min Redacting PII from prompts 7 min 20. Dates and times Trace timestamps without tears 6 min Latency windows with timedelta 6 min 21. Serialisation and formats Parsing the tool-call payload 6 min Config files on disk 6 min The cost report as CSV 7 min Model artifacts and why pickle bites 7 min OOP & Design Patterns 7 modules · 25 lessons
22. Classes and instances A Book class with title + author attributes 5 min Adding a `describe` method to a Rectangle class 5 min Two ModelConfig instances, two different model targets 4 min Build a class that owns a rendering step 8 min 23. Inheritance and polymorphism One base client, one provider subclass 8 min Extending a base method instead of copying it 8 min One dispatch loop, three unrelated clients 8 min A Retriever interface that refuses to be half-implemented 10 min 24. Magic methods and protocols Trace records that debug themselves 8 min Comparing and sorting eval runs 10 min A Dataset that answers len and indexing 8 min A span that closes even when the block raises 10 min 25. Dataclasses and properties The record type you stop hand-writing 8 min Defaults that are not shared 8 min Computed attributes that cannot go stale 9 min Rejecting a bad record at construction 8 min 26. Enums and typed structs A closed set of tiers instead of loose strings 8 min Immutable records that are still tuples 8 min Typing a payload the provider might not send 9 min 27. Design patterns Swapping the chunker without touching the splitter 10 min One place that knows how to build a client 10 min One reply type, two provider payloads 10 min A tool catalog the agent can grow 12 min 28. SOLID in practice The five principles, on a pipeline you can read 12 min Split the reporter, hand it a client 14 min Functional Python & Metaprogramming 6 modules · 15 lessons
29. First-class functions A table of functions, not a chain of branches 9 min A counter that survives the return 11 min The rule travels as an argument 9 min 30. Decorators Wrapping a call without touching the function 11 min Three layers, because each one receives something different 14 min The wrapper must not eat the name 10 min Three decorators, two orders 14 min 31. Functional toolkit Map, filter, fold, and when a comprehension wins 10 min Pinning the parameters that never change 9 min The second identical lookup should cost nothing 10 min 32. Class creation and registries A tool registers itself the moment it is defined 12 min 33. Introspection Dispatching on a name the model chose 10 min The function is the schema 14 min 34. Code generation and DSLs Running model output is a decision, not a convenience 12 min A prompt template that fails loudly on a missing variable 12 min Concurrency & Async 6 modules · 15 lessons
35. Concurrency concepts Waiting is most of a model call 12 min The GIL, without the folklore 14 min 36. asyncio foundations A coroutine runs when something awaits it 10 min Three providers, one await 10 min Scheduling work before you need the answer 10 min Every call gets a deadline 12 min 37. Advanced asyncio Tokens the moment they arrive 12 min Setup and teardown that have to await 12 min A ceiling on how many calls are in flight 12 min A queue and a fixed pool of workers 14 min 38. Executors and parallelism Thread pools, process pools, and which one to reach for 12 min CPU-bound work and the cost of moving it 12 min 39. Distributed work and resilience Work that outlives the request 12 min Retry the call without paying twice 14 min 40. Bridging sync and async Crossing between blocking code and a running loop 12 min Testing, Tooling & DevOps 8 modules · 19 lessons
41. Testing fundamentals The smallest suite that catches a regression 9 min A test case with a fixture that resets 10 min Documentation examples that fail when they drift 9 min A provider stand-in that fails on cue 11 min 42. Debugging Read the traceback to the bug, not to the crash site 10 min Logs an incident can be reconstructed from 11 min 43. Type hints Annotations that carry the contract 8 min Values that can be missing, containers that say what they hold 9 min Type the shape you call, not the class you were handed 10 min Running the checker the interpreter never runs 12 min 44. Quality and docs Docstrings that state the contract 9 min The formatter ends the argument, the linter finds the bug 11 min 45. Packaging and environments One environment per project, one lockfile per repo 12 min Reading pyproject.toml with the standard library 10 min 46. CI/CD The gates between a green branch and a deploy 12 min 47. Security essentials Configuration from the environment, keys out of the logs 10 min The value never becomes part of the query 12 min Signing a payload so the receiver can trust it 12 min 48. Code review The defect that survives review 12 min Performance & Internals 5 modules · 11 lessons
49. Profiling Time two tokenizers against each other 10 min Find the function burning the time 12 min The dedupe that grew quadratically 12 min 50. Memory Two names, one list 10 min The copy that shared its insides 12 min Fixing the field set on a million records 12 min 51. Object model and bytecode Types all the way down 10 min What the interpreter actually runs 12 min 52. AST: code as data Reading generated code before you run it 12 min Rewriting the tree and unparsing it back 12 min 53. Native code and runtimes Where the fast code actually lives 14 min Applied Python 5 modules · 13 lessons
54. Databases and SQL From schema to commit 10 min Placeholders bind values, not names 10 min Rollups the engine computes 12 min 55. HTTP and APIs The exchange a client call turns into 12 min A request payload you can hash 12 min Reading the reply, including the failures 14 min 56. CLI tools Flags, types and defaults 9 min run and report as subcommands 11 min 57. Web frameworks orientation Anatomy of a streaming chat endpoint 12 min Reject a bad chat request at the edge 12 min 58. Data stack orientation Cosine similarity over an embedding batch 11 min Rolling up trace costs with groupby 12 min Plotting a cost rollup in the browser 10 min Capstones 3 modules · 9 lessons
59. Capstone: Trace Analytics Pipeline Ingest and validate the raw export 14 min Transform and aggregate the stream 15 min Persist and report the rollup 15 min 60. Capstone: Async Model Gateway Three providers, one await 12 min Deadlines, retries, and a cap on what is in flight 15 min Merging three token streams into one 15 min 61. Capstone: Eval Runner CLI One command, two verbs, one shared flag set 12 min Scoring a suite behind the run verb 14 min Diffing two runs into an exit code 15 min