--- pretty_name: Tech Threads language: - en license: other size_categories: - 1M`) across 64,000+ texts to retain only genuine author input. 3. **Control Character Normalization:** Stripped unprintable ASCII control characters (`\x00-\x08`, `\x0b`, `\x0c`, `\x0e-\x1f`) to prevent tokenization artifacts. 4. **Log Truncation:** Gracefully truncated runaway crash dumps exceeding 40,000 characters with an explicit truncation marker, protecting LLM context windows. 5. **Code Language Tagging:** Automatically detected code blocks (`python`, `cpp`, `cuda`, `rust`, `java`, `go`, `sql`, `bash`...) and normalized them into language tags (`lang:python`, `lang:cpp`...) under the `tags` field. 6. **Relational Integrity:** Verified 0 orphan posts; all posts link strictly to their parent `thread_uid`. ## Supported Tasks - **Continual Pre-training & Domain Adaptation:** High-density technical problem-solving text, system troubleshooting logs, architectural RFCs, and code-centric discussions. - **Instruction & Multi-turn Conversational Tuning:** Natural developer problem statements paired with root-cause explanations, debugging exchanges, and accepted technical solutions. - **Software Engineering & Issue Triage Modeling:** Modeling real-world bug reports, issue triage dynamics, and pull request review discussions. - **Technical Information Retrieval:** Real-world technical queries paired with authentic community resolutions across distributed infrastructure and AI frameworks. ## Dataset Structure The dataset consists of two relational tables linked by `posts.thread_uid = threads.thread_uid`. ### `threads` Table Each row represents an original discussion thread, issue report, research paper, or technical proposal. | Column | Type | Description | |---|---|---| | `thread_uid` | `string` | Stable unique identifier for the thread across the dataset. | | `source_platform` | `string` | Platform identifier (`github`, `apache_jira`, `arxiv`, `stackexchange`, `gitlab`, `python_pep`). | | `repository` | `string` | Project or repository identifier (e.g. `apache/spark`, `ggml-org/llama.cpp`, `arxiv/cs.AI`). | | `source_kind` | `string` | Type of thread (`issue`, `discussion`, `pull_request`, `paper`, `pep`, `question`). | | `title` | `string` | Title or subject line of the thread. | | `body` | `string` | Main body text of the initial thread description or abstract. | | `tags` | `list` | Category labels, component tags, and detected programming language tags (`lang:python`, etc.). | | `created_at` | `string` | ISO 8601 timestamp when the thread was opened. | | `source_url` | `string` | Direct web link to the canonical source thread. | | `metadata` | `struct` | Nested provenance and extraction details (`thread_id`, `source_instance`, `updated_at`, `author_name`, `author_url`, `license`, `license_evidence_url`, `source_snapshot_at`, `source_version`). | ### `posts` Table Each row represents an individual message, comment, issue description, or answer within a thread. | Column | Type | Description | |---|---|---| | `post_uid` | `string` | Stable unique identifier for the post. | | `thread_uid` | `string` | Reference linking this post to its parent `threads.thread_uid`. | | `parent_post_id` | `string` | Source-native identifier of the parent message in threaded discussions (nullable). | | `source_platform` | `string` | Platform identifier (`github`, `apache_jira`, `arxiv`, `stackexchange`, `gitlab`, `python_pep`). | | `post_role` | `string` | Role of the message within the conversation (`issue`, `comment`, `question`, `answer`, `discussion`). | | `body` | `string` | Text content of the post. | | `created_at` | `string` | ISO 8601 timestamp when the post was created. | | `source_url` | `string` | Direct web link to the post (fallback to thread URL if unavailable). | | `metadata` | `struct` | Nested provenance attributes (`post_id`, `source_kind`, `post_origin`, `updated_at`, `thread_source_url`, `author_name`, `author_url`, `accepted`, `license`, `license_evidence_url`). | ## Usage Examples ### 1. Loading with Hugging Face `datasets` ```python from datasets import load_dataset # Load threads threads = load_dataset("aluha501/tech-threads", "threads", split="train") # Load posts posts = load_dataset("aluha501/tech-threads", "posts", split="train") # Filter threads by repository vllm_threads = threads.filter(lambda x: x["repository"] == "vllm-project/semantic-router") ``` ### 2. Streaming Without Local Disk Download ```python from datasets import load_dataset # Stream records iteratively for continual pre-training dataset = load_dataset("aluha501/tech-threads", "threads", split="train", streaming=True) for example in dataset: text = f"{example['title']}\n\n{example['body']}" # Pass text to tokenizer / training loop ``` ### 3. Pairing Threads and Answers with Pandas or Polars ```python import pandas as pd # Load threads and posts threads = pd.read_parquet("data/threads/train-*.parquet", columns=["thread_uid", "repository", "title", "body"]) posts = pd.read_parquet("data/posts/train-*.parquet", columns=["thread_uid", "post_role", "body", "metadata"]) # Filter for answers and join with thread titles answers = posts[posts["post_role"] == "answer"] qa_pairs = threads.merge(answers, on="thread_uid", suffixes=("_thread", "_answer")) ``` ### 4. Querying Remotely with DuckDB ```python import duckdb # Query Parquet shards directly from Hugging Face Hub without downloading the dataset query = """ SELECT repository, COUNT(*) AS thread_count FROM 'https://huggingface.co/datasets/aluha501/tech-threads/resolve/main/data/threads/train-*.parquet' GROUP BY repository ORDER BY thread_count DESC LIMIT 10; """ duckdb.sql(query).show() ``` ## Curation and Licensing The dataset aggregates content from multiple independent open-source projects; therefore, the overall dataset card is designated as `license: other`. Each individual row documents its specific source license (`Apache-2.0`, `MIT`, `BSD-2-Clause`, `BSD-3-Clause`, `CC-BY 4.0`, or `CC0-1.0`), license evidence URL, and author attribution under `metadata`. - **Deduplication:** Identical records are deduplicated by source platform and native IDs; near-duplicate text is retained to preserve distinct community inquiries. - **Quality and Safety Filtering:** Records with empty bodies, unresolvable parent threads, or secret/private-key patterns detected during collection are excluded. - **Scope:** This is a point-in-time dataset intended for research and model development. Check individual repository terms for specific downstream redistribution requirements.