MCPcopy Create free account

hub / github.com/rohitg00/ai-engineering-from-scratch / functions

Functions8,347 in github.com/rohitg00/ai-engineering-from-scratch

↓ 1 callersFunctionrun_demo
Train for 20 steps and inject a non-finite gradient on a known step.
phases/19-capstone-projects/45-gradient-clipping-amp/code/main.py:370
↓ 1 callersFunctionrun_demo
(cfg: Optional[DPOConfig] = None)
phases/19-capstone-projects/40-dpo-from-scratch/code/main.py:501
↓ 1 callersFunctionrun_demo
()
phases/19-capstone-projects/42-large-corpus-downloader/code/main.py:514
↓ 1 callersFunctionrun_demo
Run 20 training steps on a toy model and render the schedule.
phases/19-capstone-projects/44-cosine-lr-warmup/code/main.py:386
↓ 1 callersFunctionrun_demo
Build a demo corpus, tokenize it, validate it, and run the dataloader. Designed to be self-terminating: the pipeline writes into a temporary
phases/19-capstone-projects/43-hdf5-tokenized-corpus/code/main.py:504
↓ 1 callersFunctionrun_demo
(cfg: Optional[SFTConfig] = None)
phases/19-capstone-projects/39-instruction-tuning-sft/code/main.py:609
↓ 1 callersFunctionrun_demo
(cfg: Config | None = None)
phases/19-capstone-projects/38-classifier-finetuning/code/main.py:512
↓ 1 callersFunctionrun_demo
(cfg: Optional[EvalConfig] = None, write_json: bool = True)
phases/19-capstone-projects/41-eval-pipeline/code/main.py:747
↓ 1 callersFunctionrun_demo
()
phases/11-llm-engineering/11-caching-cost/code/caching_cost.py:344
↓ 1 callersFunctionrun_demo
()
phases/11-llm-engineering/10-evaluation/code/eval_framework.py:396
↓ 1 callersFunctionrun_demo
()
phases/11-llm-engineering/09-function-calling/code/function_calling.py:340
↓ 1 callersFunctionrun_demo
()
phases/11-llm-engineering/12-guardrails/code/guardrails.py:439
↓ 1 callersFunctionrun_dgm
(generations: int, hack_allowed: bool, seed: int | None = None)
phases/15-autonomous-systems/04-darwin-godel-machine/code/main.py:105
↓ 1 callersFunctionrun_distributed_demo
( world_size: int = 2, *, backend: str = "gloo", in_dim: int = 32, hidden: int = 16, o
phases/19-capstone-projects/48-distributed-fsdp-ddp/code/main.py:294
↓ 1 callersFunctionrun_distribution_check
(q, p, n_samples, rng)
phases/07-transformers-deep-dive/16-speculative-decoding/code/main.py:70
↓ 1 callersFunctionrun_elo_demo
()
phases/10-llms-from-scratch/10-evaluation/code/main.py:231
↓ 1 callersFunctionrun_eval_demo
()
phases/10-llms-from-scratch/10-evaluation/code/main.py:196
↓ 1 callersFunctionrun_experiment
()
phases/03-deep-learning-core/08-weight-initialization/code/main.py:126
↓ 1 callersFunctionrun_experiment
(e: Experiment)
phases/17-infrastructure-and-production/24-chaos-engineering-llm/code/main.py:30
↓ 1 callersFunctionrun_experiment
Simulates running the experiment in a sandboxed container. A real build shells out to: docker run --network=none --memory=8g --cpus=2 --read
phases/19-capstone-projects/05-autonomous-research-agent/code/main.py:70
↓ 1 callersFunctionrun_extraction_pipeline_demo
()
phases/11-llm-engineering/03-structured-outputs/code/main.py:294
↓ 1 callersFunctionrun_fixed_assignment
Each task is pre-assigned to worker id. Worker processes its tasks serially.
phases/16-multi-agent-and-swarms/09-parallel-swarm-networks/code/main.py:39
↓ 1 callersFunctionrun_full_pipeline_demo
()
phases/11-llm-engineering/05-context-engineering/code/main.py:398
↓ 1 callersFunctionrun_graph
(agents: list[SimAgent], correct: str, rng: random.Random, rounds: int = 2)
phases/16-multi-agent-and-swarms/15-voting-debate-topology/code/main.py:79
↓ 1 callersFunctionrun_interactive
()
phases/11-llm-engineering/17-agent-framework-tradeoffs/code/main.py:158
↓ 1 callersFunctionrun_leaderboard
( tasks: Dict[str, List[Example]], adapter: ModelAdapter, *, batch_size: int = 8, )
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:340
↓ 1 callersFunctionrun_lmpso
(n_particles: int = 20, iterations: int = 30, seed: int = 0)
phases/16-multi-agent-and-swarms/19-swarm-optimization-pso-aco/code/main.py:34
↓ 1 callersFunctionrun_loop
(user_msg: str)
phases/13-tools-and-protocols/01-the-tool-interface/code/main.py:178
↓ 1 callersFunctionrun_maddpg_style
Centralized critic assigns each agent a distinct pellet; each agent's actor moves toward its assigned target. Deploy-time only the actors run.
phases/16-multi-agent-and-swarms/20-marl-maddpg-qmix-mappo/code/main.py:94
↓ 1 callersFunctionrun_metric_comparison
()
phases/10-llms-from-scratch/10-evaluation/code/main.py:306
↓ 1 callersFunctionrun_multi_concept
(model: OpenVocabSeg, image: np.ndarray, user_utterance: str)
phases/04-computer-vision/24-sam3-open-vocab-segmentation/code/main.py:92
↓ 1 callersFunctionrun_multi_needle
(length, n_needles=3, seed=42)
phases/05-nlp-foundations-to-advanced/28-long-context-evaluation/code/main.py:70
↓ 1 callersFunctionrun_multiple_ab_tests
( n_tests=20, n_per_group=100, true_effect=0.0, alpha=0.05, )
phases/01-math-foundations/15-statistics-for-ml/code/statistics.py:357
↓ 1 callersFunctionrun_nested_schema_demo
()
phases/11-llm-engineering/03-structured-outputs/code/main.py:315
↓ 1 callersFunctionrun_niah_grid
(lengths, depths, seed=0)
phases/05-nlp-foundations-to-advanced/28-long-context-evaluation/code/main.py:55
↓ 1 callersFunctionrun_one
(cfg: LoopConfig)
phases/15-autonomous-systems/05-ai-scientist-v2/code/main.py:48
↓ 1 callersFunctionrun_one_turn
(state: AgentState, board: list[Task])
phases/14-agent-engineering/32-minimal-agent-workbench/code/main.py:95
↓ 1 callersFunctionrun_parallel
(cities: list[str])
phases/13-tools-and-protocols/03-parallel-and-streaming-tool-calls/code/main.py:41
↓ 1 callersFunctionrun_param_preview
()
phases/07-transformers-deep-dive/14-build-a-transformer-capstone/code/main.py:68
↓ 1 callersFunctionrun_pattern_catalog_demo
()
phases/11-llm-engineering/01-prompt-engineering/code/prompt_engineering.py:531
↓ 1 callersFunctionrun_perplexity_demo
()
phases/10-llms-from-scratch/10-evaluation/code/main.py:287
↓ 1 callersFunctionrun_pipeline
(cfg: dict)
phases/19-capstone-projects/07-end-to-end-fine-tuning-pipeline/code/main.py:170
↓ 1 callersFunctionrun_pipeline
(prompt: str, image_seed: int = 42)
phases/12-multimodal-ai/15-janus-pro-decoupled-encoders/code/main.py:64
↓ 1 callersFunctionrun_pipeline
()
phases/10-llms-from-scratch/03-data-pipelines/code/main.py:333
↓ 1 callersFunctionrun_probes
()
phases/14-agent-engineering/35-initialization-scripts/code/main.py:177
↓ 1 callersFunctionrun_production_demo
()
phases/11-llm-engineering/13-production-app/code/production_app.py:585
↓ 1 callersFunctionrun_prompt_only
Edits a couple of files, never runs the test, claims done.
phases/14-agent-engineering/41-workbench-for-real-repos/code/main.py:52
↓ 1 callersFunctionrun_range
(pipeline: SafetyPipeline)
phases/19-capstone-projects/15-constitutional-safety-harness/code/main.py:240
↓ 1 callersFunctionrun_react_mock
(question: str, tools: ToolRegistry, trajectory: list[tuple[str, dict[str, Any]]])
phases/14-agent-engineering/02-rewoo-plan-and-execute/code/main.py:146
↓ 1 callersFunctionrun_recipes
Returns number of rewrites applied.
phases/19-capstone-projects/09-code-migration-agent/code/main.py:58
↓ 1 callersFunctionrun_relevance_demo
()
phases/11-llm-engineering/05-context-engineering/code/main.py:427
↓ 1 callersFunctionrun_reorder_demo
()
phases/11-llm-engineering/05-context-engineering/code/main.py:316
↓ 1 callersFunctionrun_rewoo
(question: str, planner: ScriptedPlanner, tools: ToolRegistry, solver: ScriptedSolver)
phases/14-agent-engineering/02-rewoo-plan-and-execute/code/main.py:130
↓ 1 callersFunctionrun_schema_generation_demo
()
phases/11-llm-engineering/03-structured-outputs/code/main.py:248
↓ 1 callersFunctionrun_schema_validation_demo
()
phases/11-llm-engineering/03-structured-outputs/code/main.py:224
↓ 1 callersFunctionrun_scripted_agent
(tools: MemoryTools, script: list[ToolCall])
phases/14-agent-engineering/07-memory-virtual-context-memgpt/code/main.py:127
↓ 1 callersFunctionrun_sequence
()
phases/13-tools-and-protocols/06-mcp-fundamentals/code/main.py:103
↓ 1 callersFunctionrun_sequential
(tasks: list[Task])
phases/16-multi-agent-and-swarms/09-parallel-swarm-networks/code/main.py:30
↓ 1 callersFunctionrun_sequential
(cities: list[str])
phases/13-tools-and-protocols/03-parallel-and-streaming-tool-calls/code/main.py:34
↓ 1 callersFunctionrun_server
()
phases/16-multi-agent-and-swarms/12-a2a-protocol/code/main.py:119
↓ 1 callersFunctionrun_simulation
(n_agents: int = 5, ticks: int = 6)
phases/16-multi-agent-and-swarms/17-generative-agents-simulation/code/main.py:75
↓ 1 callersFunctionrun_single_prompt_demo
()
phases/11-llm-engineering/01-prompt-engineering/code/prompt_engineering.py:543
↓ 1 callersFunctionrun_swarm
Workers pull from a shared queue.
phases/16-multi-agent-and-swarms/09-parallel-swarm-networks/code/main.py:60
↓ 1 callersFunctionrun_swarm
(start_agent: Agent, user_messages: list[str])
phases/16-multi-agent-and-swarms/11-handoffs-and-routines/code/main.py:113
↓ 1 callersFunctionrun_task
( task_name: str, examples: List[Example], adapter: ModelAdapter, *, batch_size: int = 8,
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:289
↓ 1 callersFunctionrun_task
(task: Task)
phases/14-agent-engineering/19-benchmarks-swebench-gaia/code/main.py:34
↓ 1 callersFunctionrun_task
(task: Task)
phases/12-multimodal-ai/25-multimodal-agents-computer-use/code/main.py:87
↓ 1 callersFunctionrun_test_suite
()
phases/11-llm-engineering/01-prompt-engineering/code/prompt_engineering.py:480
↓ 1 callersFunctionrun_tests
()
phases/11-llm-engineering/17-agent-framework-tradeoffs/code/main.py:110
↓ 1 callersFunctionrun_tool_selection_demo
()
phases/11-llm-engineering/05-context-engineering/code/main.py:371
↓ 1 callersFunctionrun_tree
(agents: list[SimAgent], correct: str, rng: random.Random)
phases/16-multi-agent-and-swarms/15-voting-debate-topology/code/main.py:64
↓ 1 callersFunctionrun_trial
Returns (action, cover_story_held). Cover story holds iff the agent schemes and never self-incriminates across inspector_pressure follow-ups.
phases/18-ethics-safety-alignment/08-in-context-scheming-frontier-models/code/main.py:74
↓ 1 callersFunctionrun_trial
Each turn, agents commit simultaneously. Collisions waste a turn for all but one colliding agent. ToM agents avoid boxes they observed others
phases/16-multi-agent-and-swarms/18-theory-of-mind-coordination/code/main.py:51
↓ 1 callersMethodrun_until_idle
(self)
phases/14-agent-engineering/14-autogen-actor-model/code/main.py:53
↓ 1 callersFunctionrun_verify
(run: SandboxRun, difficulty: float, rng: random.Random)
phases/19-capstone-projects/16-github-issue-to-pr-agent/code/main.py:156
↓ 1 callersFunctionrun_with_feedback
(command: list[str], agent_note: str = "", timeout_s: float = 30.0)
phases/14-agent-engineering/42-agent-workbench-capstone/outputs/agent-workbench-pack/scripts/run_with_feedback.py:26
↓ 1 callersFunctionrun_with_verifier
()
phases/16-multi-agent-and-swarms/13-shared-memory-blackboard/code/main.py:171
↓ 1 callersFunctionrun_without_verifier
()
phases/16-multi-agent-and-swarms/13-shared-memory-blackboard/code/main.py:158
↓ 1 callersFunctionrun_workbench
Reads scope, edits inside scope, runs acceptance through feedback, gates, reviews, hands off.
phases/14-agent-engineering/41-workbench-for-real-repos/code/main.py:65
↓ 1 callersFunctionrun_workers
(plan: Plan, tools: ToolRegistry)
phases/14-agent-engineering/02-rewoo-plan-and-execute/code/main.py:78
↓ 1 callersFunctionrunbook_agent
(incident: str)
phases/17-infrastructure-and-production/23-sre-for-ai/code/main.py:42
↓ 1 callersMethodrunner
(hyp: Hypothesis)
phases/19-capstone-projects/56-iteration-scheduler/code/tests/test_scheduler.py:102
↓ 1 callersFunctionrvq_decode
(all_indices, codebooks, length)
phases/06-speech-and-audio/13-neural-audio-codecs/code/main.py:58
↓ 1 callersFunctionrvq_encode
(values, codebook_size=8, n_codebooks=4)
phases/06-speech-and-audio/13-neural-audio-codecs/code/main.py:46
↓ 1 callersFunctionrw_boundary_allows
True if the consequential action is allowed given the content origin.
phases/15-autonomous-systems/11-browser-agents/code/main.py:69
↓ 1 callersFunctionrwriter_name
(rw: RewriteResult)
phases/19-capstone-projects/67-query-rewriting-hyde/code/main.py:344
↓ 1 callersFunctionsaddle
(params)
phases/01-math-foundations/08-optimization/code/optimizers.py:254
↓ 1 callersFunctionsafe_arith_eval
Evaluate a small arithmetic expression without exposing eval.
phases/19-capstone-projects/49-lm-eval-harness/code/main.py:133
↓ 1 callersFunctionsales_agent_factory
()
phases/16-multi-agent-and-swarms/11-handoffs-and-routines/code/main.py:57
↓ 1 callersFunctionsame_img
(a: int, b: int)
phases/12-multimodal-ai/13-transfusion-autoregressive-diffusion/code/main.py:57
↓ 1 callersFunctionsample
(net, alphas, alpha_bars, T, t_dim, rng)
phases/08-generative-ai/06-diffusion-ddpm-from-scratch/code/main.py:128
↓ 1 callersFunctionsample
(net, num_steps, rng)
phases/08-generative-ai/13-flow-matching-rectified-flows/code/main.py:100
↓ 1 callersFunctionsample
(c_target, w)
phases/08-generative-ai/07-latent-diffusion-stable-diffusion/code/main.py:152
↓ 1 callersFunctionsample
(G, n=8, z_dim=64, device="cpu")
phases/04-computer-vision/09-image-generation-gans/code/main.py:89
↓ 1 callersFunctionsample
(probs, rng)
phases/09-reinforcement-learning/06-policy-gradients-reinforce/code/main.py:49
↓ 1 callersFunctionsample
(probs, rng)
phases/09-reinforcement-learning/07-actor-critic-a2c-a3c/code/main.py:49
↓ 1 callersFunctionsample
(prompt_seed: int, T: int = 8)
phases/12-multimodal-ai/14-show-o-discrete-diffusion-unified/code/main.py:66
↓ 1 callersFunctionsample
(probs: list[float])
phases/12-multimodal-ai/12-emu3-next-token-for-generation/code/main.py:67
↓ 1 callersFunctionsample_action
(dist, rng)
phases/09-reinforcement-learning/01-mdps-states-actions-rewards/code/main.py:31
↓ 1 callersFunctionsample_bernoulli
(p, n=1)
phases/01-math-foundations/06-probability-and-distributions/code/probability.py:55
← previousnext →5,101–5,200 of 8,347, ranked by callers