1
0
Fork 0
mirror of https://github.com/p-e-w/heretic.git synced 2026-12-03 18:42:57 +07:00

[PR #29] [CLOSED] Add support for local dataset paths in load_prompts #244

Closed
opened 2026-11-01 04:19:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/p-e-w/heretic/pull/29
Author: @tymat
Created: 11/20/2025
Status: ❌ Closed

Base: master ← Head: feature/local-dataset-support


📝 Commits (2)

  • 2ccedc5 Add support for local dataset paths in load_prompts
  • 1c7a84e Fix support for MXFP4 quantized models with Triton tensors

📊 Changes

2 files changed (+31 additions, -2 deletions)

View changed files

📝 src/heretic/model.py (+5 -0)
📝 src/heretic/utils.py (+26 -2)

📄 Description

This change allows load_prompts() to work with both HuggingFace dataset IDs and local directory paths containing datasets saved in Arrow format.

Changes:

  • Import load_from_disk from datasets library
  • Add directory detection logic to load_prompts()
  • Handle local datasets with proper split parsing (e.g., "train[:400]")
  • Maintain backward compatibility with HuggingFace dataset IDs

Benefits:

  • Users can work with custom/modified datasets stored locally
  • Enables offline usage with pre-downloaded datasets
  • Fully backward compatible - existing configs continue to work
  • Supports the same split syntax for both local and remote datasets

The function now:

  1. Checks if the dataset path is a local directory
  2. If yes, uses load_from_disk() and parses split syntax manually
  3. If no, falls back to the original load_dataset() behavior

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/p-e-w/heretic/pull/29 **Author:** [@tymat](https://github.com/tymat) **Created:** 11/20/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature/local-dataset-support` --- ### 📝 Commits (2) - [`2ccedc5`](https://github.com/p-e-w/heretic/commit/2ccedc517eaaa88bf4699a57024ecbde3e7fb7b3) Add support for local dataset paths in load_prompts - [`1c7a84e`](https://github.com/p-e-w/heretic/commit/1c7a84e5412fe4e93a23505cf4a8e67697527e48) Fix support for MXFP4 quantized models with Triton tensors ### 📊 Changes **2 files changed** (+31 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/heretic/model.py` (+5 -0) 📝 `src/heretic/utils.py` (+26 -2) </details> ### 📄 Description This change allows load_prompts() to work with both HuggingFace dataset IDs and local directory paths containing datasets saved in Arrow format. Changes: - Import load_from_disk from datasets library - Add directory detection logic to load_prompts() - Handle local datasets with proper split parsing (e.g., "train[:400]") - Maintain backward compatibility with HuggingFace dataset IDs Benefits: - Users can work with custom/modified datasets stored locally - Enables offline usage with pre-downloaded datasets - Fully backward compatible - existing configs continue to work - Supports the same split syntax for both local and remote datasets The function now: 1. Checks if the dataset path is a local directory 2. If yes, uses load_from_disk() and parses split syntax manually 3. If no, falls back to the original load_dataset() behavior --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 04:19:10 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p-e-w/heretic#244
No description provided.