Dataset Viewer
Auto-converted to Parquet Duplicate
code_prompt
stringclasses
3 values
code_completion
stringclasses
3 values
from datetime import date from decimal import Decimal, InvalidOperation def register_receipt(receipt: dict, received_on: date) -> dict: """Build a normalized, traceable record for an accepted supplier delivery. receipt contains supplier_id, product_id, supplier_lot, quantity, and unit. """ # Complete ...
required = ("supplier_id", "product_id", "supplier_lot", "quantity", "unit") missing = [key for key in required if key not in receipt] if missing: raise ValueError(f"Missing receipt fields: {', '.join(missing)}") for key in ("supplier_id", "product_id", "supplier_lot", "unit"): value = ...
def find_recall_scope(events: list[dict], recalled_lot: str) -> dict: """Find downstream lots and sales associated with a recalled lot. A split event has type='split', parent_lot, and child_lots. A sale event has type='sale', lot_id, order_id, and quantity. """ # Complete the traversal and collect ...
children = {} for event in events: if event.get("type") == "split": parent = event["parent_lot"] children.setdefault(parent, set()).update(event["child_lots"]) affected_lots = set() pending = [recalled_lot] while pending: lot_id = pending.pop() if lot...
from decimal import Decimal, InvalidOperation def transfer_lot_stock( stock: dict[str, dict[str, Decimal]], movement: dict ) -> tuple[dict[str, dict[str, Decimal]], dict]: """Apply a lot transfer without mutating the input stock mapping. stock maps each location to lot quantities. movement contains lot_id...
required = ("lot_id", "from_location", "to_location", "quantity", "recorded_at") missing = [key for key in required if key not in movement] if missing: raise ValueError(f"Missing movement fields: {', '.join(missing)}") for key in ("lot_id", "from_location", "to_location", "recorded_at"): ...

Food Receiving and Lot Traceability Code Completion Dataset

This dataset contains code completion examples for specialty food retail workflows, including supplier receiving, lot registration, source information linking, and recall traceability. Each example pairs an incomplete function, data structure, or processing logic with its target code, focusing on food lot movement and traceability tasks. It is suitable for supervised fine-tuning of code generation models, workflow understanding, and evaluation of domain-specific coding capabilities.

Technical Specifications

Field Type Description
code_prompt string Original input for code generation, containing an incomplete function, data structure, or processing logic.
code_completion string Target code generated from the code completion prompt for supervised code generation training.

Compliance Statement

Authorization TypeCC-BY-NC-SA 4.0 (Attribution–NonCommercial–ShareAlike)
Commercial UseRequires exclusive subscription or authorization contract (monthly or per-invocation charging)
Privacy and AnonymizationNo PII, no real company names, simulated scenarios follow industry standards
Compliance SystemCompliant with China's Data Security Law / EU GDPR / supports enterprise data access logs

Source & Contact

contact@mobiusi.com

Downloads last month
-