• bitcoinBitcoin(BTC)$81,133.000.57%
  • Midas Fasanara Global EuroMidas Fasanara Global Euro(MGLOEURO)$111,813.00-0.36%
  • ethereumEthereum(ETH)$2,354.600.47%
  • tetherTether(USDT)$1.000.03%
  • binancecoinBNB(BNB)$758.912.32%
  • rippleXRP(XRP)$1.32-0.24%
  • usd-coinUSDC(USDC)$1.000.02%
  • solanaSolana(SOL)$102.191.03%
  • tronTRON(TRX)$0.329152-0.73%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.030.03%
  • zcashZcash(ZEC)$1,306.870.58%
  • HyperliquidHyperliquid(HYPE)$80.54-0.98%
  • dogecoinDogecoin(DOGE)$0.0797631.23%
  • moneroMonero(XMR)$596.82-1.21%
  • USDSUSDS(USDS)$1.000.01%
  • whitebitWhiteBIT Coin(WBT)$77.880.49%
  • chainlinkChainlink(LINK)$11.822.32%
  • leo-tokenLEO Token(LEO)$9.424.14%
  • cardanoCardano(ADA)$0.2060900.38%
  • nearNEAR Protocol(NEAR)$4.710.91%
  • stellarStellar(XLM)$0.1722751.45%
  • bitcoin-cashBitcoin Cash(BCH)$289.07-2.04%
  • RainRain(RAIN)$0.006812-5.05%
  • litecoinLitecoin(LTC)$59.544.44%
  • daiDai(DAI)$1.00-0.02%
  • uniswapUniswap(UNI)$7.273.10%
  • Ethena USDeEthena USDe(USDE)$1.000.01%
  • CantonCanton(CC)$0.1004291.30%
  • avalanche-2Avalanche(AVAX)$9.000.63%
  • suiSui(SUI)$0.951.63%
  • USD1USD1(USD1)$1.000.02%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.240.73%
  • hedera-hashgraphHedera(HBAR)$0.075191-0.74%
  • tether-goldTether Gold(XAUT)$4,034.34-0.52%
  • Global DollarGlobal Dollar(USDG)$1.000.02%
  • paypal-usdPayPal USD(PYUSD)$1.000.00%
  • BittensorBittensor(TAO)$257.661.07%
  • shiba-inuShiba Inu(SHIB)$0.0000051.80%
  • quant-networkQuant(QNT)$200.430.88%
  • EthenaEthena(ENA)$0.208470-0.35%
  • crypto-com-chainCronos(CRO)$0.053461-0.80%
  • Ripple USDRipple USD(RLUSD)$1.000.02%
  • BitwayBitway(BTW)$1.73-0.78%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.150.02%
  • Circle USYCCircle USYC(USYC)$1.140.01%
  • MemeCoreMemeCore(M)$1.04-3.40%
  • okbOKB(OKB)$111.461.92%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • pepePepe(PEPE)$0.00000511.27%
  • Pump.funPump.fun(PUMP)$0.0045414.51%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

How to Use AgentTrove: Streaming 1.7M Agentic Traces and Building a Clean ShareGPT SFT Dataset in Python

May 30, 2026
in AI & Technology
Reading Time: 2 mins read
A A
How to Use AgentTrove: Streaming 1.7M Agentic Traces and Building a Clean ShareGPT SFT Dataset in Python
ShareShareShareShareShare
def is_success(row):
   res = (row.get("result") or "").lower()
   if res in ("resolved", "success", "pass", "passed", "correct"):
       return True
   rw = row.get("reward")
   try:
       return float(rw) >= 1.0
   except (TypeError, ValueError):
       return False
out_path = "agenttrove_clean_sft.jsonl"
kept, scanned, SCAN, KEEP = 0, 0, 1500, 200
print(f"\n⏳ Scanning up to {SCAN} rows, keeping up to {KEEP} successful traces…")
with open(out_path, "w") as f:
   for row in itertools.islice(load_dataset(REPO, split="train", streaming=True), SCAN):
       scanned += 1
       if not is_success(row):
           continue
       turns = normalize_turns(row[TRACE_KEY])
       conv = [{"from": r, "value": c} for r, c in turns if c.strip()]
       if len(conv) < 2:
           continue
       f.write(json.dumps({
           "conversations": conv,
           "source": row.get("original_source"),
           "teacher": row.get("original_teacher"),
       }) + "\n")
       kept += 1
       if kept >= KEEP:
           break
print(f"✅ Scanned {scanned} rows → wrote {kept} clean traces to '{out_path}'")
def search_traces(keyword=None, source=None, limit=3, scan=3000):
   """Stream the dataset and yield-print traces matching filters."""
   hits = 0
   for row in itertools.islice(load_dataset(REPO, split="train", streaming=True), scan):
       if source and row.get("original_source") != source:
           continue
       if keyword:
           blob = " ".join(c for _, c in normalize_turns(row[TRACE_KEY]))
           if keyword.lower() not in blob.lower():
               continue
       render_trace(row, max_chars=300)
       hits += 1
       if hits >= limit:
           break
   if hits == 0:
       print("No matches in the scanned window — try increasing `scan`.")
print("\n🔍 Searching for 'nl2bash' source traces:")
search_traces(source="nl2bash", limit=2, scan=4000)
print("\n🎉 Tutorial complete! Next ideas:")
print("   • Increase N / SCAN for bigger analyses.")
print("   • Filter by original_source (swesmith, codeforces, r2egym…) for a domain SFT set.")
print("   • Feed agenttrove_clean_sft.jsonl into Axolotl / LLaMA-Factory for fine-tuning.")

Credit: Source link

YOU MAY ALSO LIKE

Microsoft Posts 19% Revenue Growth as Azure Revenue Jumps 48% – Unite.AI

Apple’s PROLED XDR Display Has A Cringy Name But Incredible Specs

ShareTweetSendSharePin

Related Posts

Microsoft Posts 19% Revenue Growth as Azure Revenue Jumps 48% – Unite.AI
AI & Technology

Microsoft Posts 19% Revenue Growth as Azure Revenue Jumps 48% – Unite.AI

October 28, 2026
Apple’s PROLED XDR Display Has A Cringy Name But Incredible Specs
AI & Technology

Apple’s PROLED XDR Display Has A Cringy Name But Incredible Specs

October 28, 2026
Meta Weighs Delaying ‘Alarming’ New Business Terms As Backlash Grows
AI & Technology

Meta Weighs Delaying ‘Alarming’ New Business Terms As Backlash Grows

October 28, 2026
Google DeepMind Introduces Gemini 4 Carbon, Its Top Model for Cyber Defense and Coding
AI & Technology

Google DeepMind Introduces Gemini 4 Carbon, Its Top Model for Cyber Defense and Coding

October 28, 2026
Next Post
Over half of Great American State Fair performers drop out over politics, threats – The Washington Post

Over half of Great American State Fair performers drop out over politics, threats - The Washington Post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
Abdul El-Sayed walks back his past criticism of Obama

Abdul El-Sayed walks back his past criticism of Obama

October 27, 2026
Luxury loses its sheen as LVMH, Kering and Hermès stocks all plunge amid declining sales

Luxury loses its sheen as LVMH, Kering and Hermès stocks all plunge amid declining sales

October 23, 2026
Pilgrims express best wishes after Pope Leo’s cancer diagnosis

Pilgrims express best wishes after Pope Leo’s cancer diagnosis

October 26, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!