MCPcopy Create free account

hub / github.com/ai-infra-curriculum/ai-infra-engineer-learning / functions

Functions523 in github.com/ai-infra-curriculum/ai-infra-engineer-learning

↓ 7 callersMethodget
TODO: Get value from cache
projects/project-101-basic-model-serving/src/utils.py:597
↓ 3 callersMethod__init__
Initialize data source Args: source_name: Name of the data source config: Configuration dictionary with sour
projects/project-102-mlops-pipeline/src/data/ingestion.py:37
↓ 2 callersMethod__init__
Initialize vector indexer. Args: collection_name: Name of vector collection batch_size: Documents per batch
projects/project-103-llm-deployment/src/ingestion/indexer.py:80
↓ 2 callersMethod__init__
Initialize rate limiter. TODO: Implement initialization - Store rate limit configuration - Initialize client buckets
projects/project-103-llm-deployment/src/api/middleware.py:71
↓ 2 callersFunctionformat_sse
Format data as Server-Sent Event. SSE format: - event: event_name - data: json_data - id: event_id - (blank line to end even
projects/project-103-llm-deployment/src/api/streaming.py:42
↓ 2 callersMethodquery
Process a RAG query. Args: question: User question filters: Optional metadata filters for retrieval
projects/project-103-llm-deployment/src/rag/pipeline.py:108
↓ 2 callersMethodrun
TODO: Execute ingestion pipeline Steps: 1. Connect to all data sources 2. Fetch data from each source 3. Com
projects/project-102-mlops-pipeline/src/data/ingestion.py:417
↓ 2 callersMethodto_dict
Convert to dictionary.
projects/project-102-mlops-pipeline/src/monitoring/health.py:63
↓ 1 callersMethod__init__
Initialize the LLM server. Args: config: LLM configuration object with model settings TODO: Initialize the foll
projects/project-103-llm-deployment/src/llm/server.py:60
↓ 1 callersMethod__init__
Initialize RAG pipeline. Args: retriever: Document retriever instance llm_server: LLM server instance
projects/project-103-llm-deployment/src/rag/pipeline.py:79
↓ 1 callersMethod_create_chunks
Convert text chunks to Chunk objects. Args: texts: List of text chunks metadata: Metadata to attach
projects/project-103-llm-deployment/src/rag/chunking.py:227
↓ 1 callersMethod_default_prompt_template
Default RAG prompt template. Returns: Prompt template string TODO: Create effective RAG prompt: 1. Syst
projects/project-103-llm-deployment/src/rag/pipeline.py:294
↓ 1 callersMethod_generate_complete
Internal method for complete generation. TODO: Implement non-streaming logic: 1. Generate text synchronously 2. Wait
projects/project-103-llm-deployment/src/llm/server.py:222
↓ 1 callersMethod_generate_stream
Internal method for streaming generation. TODO: Implement streaming logic: 1. Generate unique request ID 2. Create a
projects/project-103-llm-deployment/src/llm/server.py:198
↓ 1 callersMethod_recursive_split
Recursively split text. Args: text: Text to split separators: Remaining separators to try Returns:
projects/project-103-llm-deployment/src/rag/chunking.py:211
↓ 1 callersMethodcheck_airflow_scheduler
Check Airflow scheduler health. Returns: ComponentHealth object TODO: 1. Check if scheduler is running
projects/project-102-mlops-pipeline/src/monitoring/health.py:130
↓ 1 callersMethodcheck_airflow_webserver
Check Airflow webserver health. Returns: ComponentHealth object TODO: 1. Ping webserver endpoint
projects/project-102-mlops-pipeline/src/monitoring/health.py:172
↓ 1 callersMethodcheck_all_components
Check health of all components. Returns: Dictionary mapping component name to health status TODO: 1. Ru
projects/project-102-mlops-pipeline/src/monitoring/health.py:101
↓ 1 callersMethodcheck_minio
Check MinIO object storage health. Returns: ComponentHealth object TODO: 1. Test MinIO API endpoint
projects/project-102-mlops-pipeline/src/monitoring/health.py:258
↓ 1 callersMethodcheck_mlflow_server
Check MLflow tracking server health. Returns: ComponentHealth object TODO: 1. Ping MLflow API endpoint
projects/project-102-mlops-pipeline/src/monitoring/health.py:189
↓ 1 callersMethodcheck_model_serving
Check model serving endpoints health. Returns: ComponentHealth object TODO: 1. Get list of deployed mod
projects/project-102-mlops-pipeline/src/monitoring/health.py:281
↓ 1 callersMethodcheck_postgresql
Check PostgreSQL database health. Returns: ComponentHealth object TODO: 1. Test database connection
projects/project-102-mlops-pipeline/src/monitoring/health.py:211
↓ 1 callersMethodcheck_redis
Check Redis cache health. Returns: ComponentHealth object TODO: 1. Test Redis connection 2. Ver
projects/project-102-mlops-pipeline/src/monitoring/health.py:235
↓ 1 callersFunctiondummy_generator
()
projects/project-103-llm-deployment/src/api/main.py:372
↓ 1 callersMethodinitialize
Asynchronously initialize the LLM engine and load the model. This is a separate method to allow for async initialization in the API
projects/project-103-llm-deployment/src/llm/server.py:86
↓ 1 callersMethodload_model
TODO: Load the pre-trained model Steps: 1. Check if model_name is valid 2. Load model from torchvision.models
projects/project-101-basic-model-serving/src/model.py:63
↓ 1 callersMethodpredict
TODO: Run inference and return predictions Args: image_bytes: Raw image bytes top_k: Number of top predictio
projects/project-101-basic-model-serving/src/model.py:221
↓ 1 callersFunctionregister_model_in_mlflow
TODO: Register model in MLflow Model Registry Steps: 1. Connect to MLflow Model Registry 2. Register model with version 3. Add m
projects/project-102-mlops-pipeline/dags/training_pipeline.py:273
Method__init__
Initialize preprocessor Args: config: Preprocessing configuration
projects/project-102-mlops-pipeline/src/data/preprocessing.py:46
Method__init__
Initialize data validator Args: config: Validation configuration including expectations
projects/project-102-mlops-pipeline/src/data/validation.py:43
Method__init__
(self, config: Dict)
projects/project-102-mlops-pipeline/src/data/ingestion.py:104
Method__init__
(self, config: Dict)
projects/project-102-mlops-pipeline/src/data/ingestion.py:172
Method__init__
(self, config: Dict)
projects/project-102-mlops-pipeline/src/data/ingestion.py:280
Method__init__
Initialize ingestion pipeline Args: config: Pipeline configuration with data sources
projects/project-102-mlops-pipeline/src/data/ingestion.py:396
Method__init__
Initialize model trainer Args: config: Training configuration including model type, hyperparameters, etc.
projects/project-102-mlops-pipeline/src/training/train.py:41
Method__init__
Initialize evaluator
projects/project-102-mlops-pipeline/src/training/evaluate.py:37
Method__init__
(self, config: Dict)
projects/project-102-mlops-pipeline/src/deployment/deploy.py:35
Method__init__
Initialize component health. Args: component_name: Name of the component status: Health status m
projects/project-102-mlops-pipeline/src/monitoring/health.py:38
Method__init__
Initialize health checker. Args: config: Configuration with component endpoints and thresholds TODO: 1.
projects/project-102-mlops-pipeline/src/monitoring/health.py:82
Method__init__
Initialize model metrics.
projects/project-102-mlops-pipeline/src/monitoring/metrics.py:31
Method__init__
Initialize data quality metrics.
projects/project-102-mlops-pipeline/src/monitoring/metrics.py:164
Method__init__
Initialize pipeline metrics.
projects/project-102-mlops-pipeline/src/monitoring/metrics.py:271
Method__init__
Initialize metrics exporter. Args: port: Port to serve metrics on TODO: 1. Initialize Prometheus HTTP s
projects/project-102-mlops-pipeline/src/monitoring/metrics.py:404
Method__init__
Initialize the optimizer. Args: config: LLM configuration object TODO: 1. Store configuration 2
projects/project-103-llm-deployment/src/llm/optimization.py:65
Method__init__
(self)
projects/project-103-llm-deployment/src/llm/optimization.py:509
Method__init__
(self, config: LLMConfig)
projects/project-103-llm-deployment/src/llm/server.py:360
Method__init__
Initialize text loader. Args: encoding: Force specific encoding (None = auto-detect)
projects/project-103-llm-deployment/src/ingestion/loader.py:101
Method__init__
Initialize PDF loader. Args: ocr_enabled: Whether to use OCR for scanned PDFs
projects/project-103-llm-deployment/src/ingestion/loader.py:212
Method__init__
Initialize web loader. Args: timeout: Request timeout in seconds user_agent: Custom user agent string
projects/project-103-llm-deployment/src/ingestion/loader.py:334
Method__init__
Initialize directory loader. Args: file_types: List of extensions to load (None = all) recursive: Whether to
projects/project-103-llm-deployment/src/ingestion/loader.py:460
Method__init__
Initialize Pinecone indexer. Args: api_key: Pinecone API key environment: Pinecone environment i
projects/project-103-llm-deployment/src/ingestion/indexer.py:335
Method__init__
Initialize ChromaDB indexer. Args: persist_directory: Directory for ChromaDB storage collection_name: Collec
projects/project-103-llm-deployment/src/ingestion/indexer.py:426
Method__init__
Initialize async indexer. Args: base_indexer: Base synchronous indexer max_concurrent: Max concurrent batche
projects/project-103-llm-deployment/src/ingestion/indexer.py:516
Method__init__
Initialize text cleaner. Args: remove_urls: Whether to remove URLs remove_emails: Whether to remove email ad
projects/project-103-llm-deployment/src/ingestion/processor.py:55
Method__init__
Initialize document filter. Args: min_length: Minimum character count max_length: Maximum character count
projects/project-103-llm-deployment/src/ingestion/processor.py:213
Method__init__
Initialize document processor. Args: cleaner: Text cleaner instance filter: Document filter instance
projects/project-103-llm-deployment/src/ingestion/processor.py:482
Method__init__
Initialize authentication. TODO: Implement initialization - Load API keys (from database/config) - Set up key valida
projects/project-103-llm-deployment/src/api/middleware.py:363
Method__init__
Initialize cost tracking. Args: app: FastAPI application cost_per_1k_tokens: Pricing per model
projects/project-103-llm-deployment/src/api/middleware.py:495
Method__init__
Initialize buffer. Args: buffer_size: Number of tokens to buffer flush_timeout: Max seconds to wait before f
projects/project-103-llm-deployment/src/api/streaming.py:457
Method__init__
Initialize fixed-size chunker. Args: chunk_size: Size of each chunk (in characters or tokens) chunk_overlap:
projects/project-103-llm-deployment/src/rag/chunking.py:75
Method__init__
Initialize recursive chunker. Args: chunk_size: Target chunk size chunk_overlap: Overlap between chunks
projects/project-103-llm-deployment/src/rag/chunking.py:153
Method__init__
Initialize semantic chunker. Args: embedding_model: Model for computing embeddings breakpoint_threshold: Sim
projects/project-103-llm-deployment/src/rag/chunking.py:252
Method__init__
Initialize markdown chunker. Args: chunk_size: Target chunk size chunk_overlap: Overlap between chunks
projects/project-103-llm-deployment/src/rag/chunking.py:333
Method__init__
Initialize the vector retriever. Args: vector_db_client: Vector database client instance embedding_model: Em
projects/project-103-llm-deployment/src/rag/retriever.py:94
Method__init__
Initialize hybrid retriever. Args: dense_retriever: Vector-based retriever sparse_retriever: Keyword-based r
projects/project-103-llm-deployment/src/rag/retriever.py:242
Method__init__
Initialize reranker. Args: base_retriever: First-stage retriever reranker_model: Cross-encoder for reranking
projects/project-103-llm-deployment/src/rag/retriever.py:348
Method__init__
Initialize multi-query retriever. Args: base_retriever: Underlying retriever query_generator: LLM to generat
projects/project-103-llm-deployment/src/rag/retriever.py:450
Method__init__
Initialize conversational RAG. Args: retriever: Document retriever llm_server: LLM server config
projects/project-103-llm-deployment/src/rag/pipeline.py:411
Method__init__
Initialize embedding model. Args: model_name: Hugging Face model name device: Device to use (cuda/cpu)
projects/project-103-llm-deployment/src/rag/embeddings.py:46
Method__init__
Initialize multi-modal embeddings. Args: text_model: Text embedding model image_model: Optional image embedd
projects/project-103-llm-deployment/src/rag/embeddings.py:331
Method__init__
Initialize metrics collector. Args: model_name: Name of the LLM model cost_per_1k_tokens: Cost configuration
projects/project-103-llm-deployment/src/monitoring/metrics.py:133
Method__init__
Initialize GPU monitor. Args: collector: MetricsCollector instance update_interval: Update interval in secon
projects/project-103-llm-deployment/src/monitoring/metrics.py:457
Method__init__
Initialize cost calculator. Args: pricing_config: Pricing configuration dict
projects/project-103-llm-deployment/src/monitoring/cost_tracker.py:106
Method__init__
Initialize cost tracker. Args: calculator: CostCalculator instance
projects/project-103-llm-deployment/src/monitoring/cost_tracker.py:298
Method__init__
Initialize budget monitor. Args: budgets: Dict of budgets {customer_id: budget_usd}
projects/project-103-llm-deployment/src/monitoring/cost_tracker.py:516
Method__init__
TODO: Initialize cache Args: max_size: Maximum number of entries ttl_seconds: Time-to-live for cache entries
projects/project-101-basic-model-serving/src/utils.py:586
Method__init__
Initialize the model inference class TODO: Implement initialization Args: model_name: Name of the model to load
projects/project-101-basic-model-serving/src/model.py:31
Method__post_init__
TODO: Post-initialization processing - Validate content is not empty - Add default metadata if missing - Generate ID
projects/project-103-llm-deployment/src/ingestion/loader.py:69
Method_build_context
Build context string from retrieved documents. Args: retrieved_docs: Retrieved documents max_tokens: Maximum
projects/project-103-llm-deployment/src/rag/pipeline.py:188
Method_build_filter_expression
Build database-specific filter expression. Args: filters: Dictionary of filters Returns: Filter exp
projects/project-103-llm-deployment/src/rag/retriever.py:208
Method_build_prompt
Build complete prompt with context and question. Args: question: User question context: Retrieved context
projects/project-103-llm-deployment/src/rag/pipeline.py:264
Method_calculate_confidence
Calculate confidence score for the answer. Args: answer: Generated answer retrieved_docs: Retrieved document
projects/project-103-llm-deployment/src/rag/pipeline.py:329
Method_calculate_readability
Calculate readability score. TODO: Implement Flesch reading ease or similar - Count words, sentences, syllables - Ca
projects/project-103-llm-deployment/src/ingestion/processor.py:446
Method_check_existing
Check which documents already exist. TODO: Implement duplicate checking - Query vector database for IDs - Return set
projects/project-103-llm-deployment/src/ingestion/indexer.py:241
Method_check_nvidia
Check if NVIDIA GPU available. TODO: Implement NVIDIA check - Try importing pynvml - Initialize NVML - Retur
projects/project-103-llm-deployment/src/monitoring/metrics.py:478
Method_consume_token
Attempt to consume one token. TODO: Implement token consumption - Get current tokens - If >= 1, consume and return T
projects/project-103-llm-deployment/src/api/middleware.py:170
Method_create_transforms
TODO: Create image preprocessing transforms ImageNet models expect: - Image size: 224x224 - Normalized with mean=[0.
projects/project-101-basic-model-serving/src/model.py:112
Method_detect_encoding
Detect file encoding. TODO: Implement encoding detection - Try common encodings (utf-8, latin-1, etc.) - Use chardet
projects/project-103-llm-deployment/src/ingestion/loader.py:164
Method_detect_language
Detect text language. TODO: Implement language detection - Use langdetect or similar library - Return ISO language c
projects/project-103-llm-deployment/src/ingestion/processor.py:273
Method_extract_headers
Extract headers and their positions. Args: text: Markdown text Returns: List of (level, text, posit
projects/project-103-llm-deployment/src/rag/chunking.py:386
Method_extract_html_metadata
Extract metadata from HTML. TODO: Implement metadata extraction - Get title from <title> tag - Get description from
projects/project-103-llm-deployment/src/ingestion/loader.py:408
Method_extract_keywords
Extract keywords from text. TODO: Implement keyword extraction - Use TF-IDF or similar - Filter stop words -
projects/project-103-llm-deployment/src/ingestion/processor.py:414
Method_extract_pdf_metadata
Extract PDF metadata. TODO: Implement metadata extraction - Get title, author, subject from PDF info - Get creation/
projects/project-103-llm-deployment/src/ingestion/loader.py:286
Method_format_document
Format a single document for context. Args: doc: Document to format index: Document index Returns:
projects/project-103-llm-deployment/src/rag/pipeline.py:244
Method_generate_id
Generate unique ID for document. TODO: Implement ID generation - Use content hash or metadata - Ensure uniqueness
projects/project-103-llm-deployment/src/ingestion/indexer.py:215
Method_generate_query_variations
Generate query variations using LLM. Args: query: Original query Returns: List of query variations
projects/project-103-llm-deployment/src/rag/retriever.py:518
Method_get_cache_key
Generate cache key for text. Args: text: Input text Returns: Cache key (hash) TODO: Create
projects/project-103-llm-deployment/src/rag/embeddings.py:240
Method_get_client_id
Get unique client identifier. TODO: Implement client identification - Check for API key in headers - Fall back to IP
projects/project-103-llm-deployment/src/api/middleware.py:102
Method_get_query_instruction
Get query instruction prefix for model. Returns: Instruction string or empty string TODO: Return instruction ba
projects/project-103-llm-deployment/src/rag/embeddings.py:261
Method_get_tokens
Get current token count for client. TODO: Implement token bucket logic - Get bucket for client (create if new) - Cal
projects/project-103-llm-deployment/src/api/middleware.py:128
next →1–100 of 523, ranked by callers