Skip to content
PiinfraCLI & tooling

Upload Pi agent session traces to Hugging Face dataset

Session from pi-sessions on Hugging Face by julien-c · CC-BY-4.0 · condensed by Coders Talk

8msession
0interventions
GOAL

Find local Pi agent session trace files and upload them to a Hugging Face Hub dataset, including an organized subfolder version.

  1. Prompt · +0
    Can you find the Pi sessions traces from this directory (~/.pi/agent/sessions) and tell me how many there are?
  2. Agent did · +0m
    Listed ~/.pi/agent/sessions and found 3 project directories, one being the huggingface.js sessions folder.
  3. Prompt · +0m
    Yes, look at the huggingface.js ones.
  4. Agent did · +0m
    Listed the huggingface.js session folder, finding 7 trace files ranging from 5KB to 362KB, all from the same day.
  5. Prompt · +1m
    No. Upload all of them to my huggingface.co/datasets/julien-c/pi-sessions dataset using the hf CLI skill.
  6. Agent did · +1m
    Read the hf-cli skill doc, then ran hf upload to push all 7 jsonl files to the julien-c/pi-sessions dataset, producing a commit URL.
  7. Prompt · +7m
    Can you also upload them in a subfolder named huggingface.js?
  8. Agent did · +8m
    Started copying the 7 jsonl files into /tmp/pi-upload/huggingface.js in preparation for a second upload into a named subfolder.
  9. Outcome · +8m
    7 session trace files uploaded to the julien-c/pi-sessions dataset via a single hf upload commit.
VERDICT

I'd next time just ask upfront to upload straight into a named subfolder instead of doing the flat upload first and then redoing it. The hf-cli skill made the actual upload trivial once I pointed it at the right folder and dataset.

I tried this · 0

Discussion · 0

How Builds work