• bitcoinBitcoin(BTC)$60,776.003.37%
  • ethereumEthereum(ETH)$1,704.433.28%
  • tetherTether(USDT)$1.000.02%
  • binancecoinBNB(BNB)$552.242.30%
  • usd-coinUSDC(USDC)$1.000.00%
  • rippleXRP(XRP)$0.954.71%
  • solanaSolana(SOL)$70.894.49%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.061.33%
  • tronTRON(TRX)$0.303653-1.26%
  • HyperliquidHyperliquid(HYPE)$61.065.38%
  • zcashZcash(ZEC)$722.081.67%
  • moneroMonero(XMR)$493.44-2.09%
  • dogecoinDogecoin(DOGE)$0.0568135.97%
  • leo-tokenLEO Token(LEO)$8.96-0.49%
  • whitebitWhiteBIT Coin(WBT)$61.5210.01%
  • chainlinkChainlink(LINK)$9.246.97%
  • USDSUSDS(USDS)$1.000.01%
  • cardanoCardano(ADA)$0.1488486.79%
  • Ethena USDeEthena USDe(USDE)$1.000.02%
  • stellarStellar(XLM)$0.1273994.50%
  • daiDai(DAI)$1.000.01%
  • bitcoin-cashBitcoin Cash(BCH)$207.706.51%
  • nearNEAR Protocol(NEAR)$3.099.92%
  • litecoinLitecoin(LTC)$43.618.65%
  • CantonCanton(CC)$0.0777135.16%
  • avalanche-2Avalanche(AVAX)$6.633.40%
  • tether-goldTether Gold(XAUT)$3,561.081.77%
  • uniswapUniswap(UNI)$4.724.97%
  • USD1USD1(USD1)$1.00-0.02%
  • Ripple USDRipple USD(RLUSD)$1.00-0.01%
  • suiSui(SUI)$0.675.98%
  • the-open-networkGram (prev. Toncoin)(GRAM)$0.953.39%
  • Global DollarGlobal Dollar(USDG)$1.000.02%
  • hedera-hashgraphHedera(HBAR)$0.0536838.23%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.15-0.03%
  • paypal-usdPayPal USD(PYUSD)$1.000.02%
  • quant-networkQuant(QNT)$150.306.71%
  • BittensorBittensor(TAO)$183.085.36%
  • shiba-inuShiba Inu(SHIB)$0.0000045.56%
  • Circle USYCCircle USYC(USYC)$1.150.02%
  • Spiko Amundi Overnight Swap Fund (EUR)Spiko Amundi Overnight Swap Fund (EUR)(EURSAFO)$1.120.33%
  • crypto-com-chainCronos(CRO)$0.0397372.08%
  • MemeCoreMemeCore(M)$0.8511.88%
  • RainRain(RAIN)$0.002554-7.10%
  • okbOKB(OKB)$82.143.32%
  • Falcon USDFalcon USD(USDF)$1.000.08%
  • United StablesUnited Stables(U)$1.000.02%
  • pax-goldPAX Gold(PAXG)$3,559.861.75%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • pepePepe(PEPE)$0.0000044.83%
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 Build a T4-Friendly Autonomous Data Science Agent with DeepAnalyze-8B, Sandboxed Code Execution, and Iterative Analysis

July 10, 2026
in AI & Technology
Reading Time: 2 mins read
A A
How to Build a T4-Friendly Autonomous Data Science Agent with DeepAnalyze-8B, Sandboxed Code Execution, and Iterative Analysis
ShareShareShareShareShare
def _hsize(nbytes):
   for u in ["B", "KB", "MB", "GB"]:
       if nbytes < 1024: return f"{nbytes:.1f}{u}"
       nbytes /= 1024
   return f"{nbytes:.1f}TB"
def build_prompt(instruction, workspace):
   exts = (".csv", ".xlsx", ".xls", ".json", ".xml", ".yaml", ".yml",
           ".txt", ".md", ".tsv", ".db", ".sqlite")
   files = sorted(f for f in os.listdir(workspace) if f.lower().endswith(exts))
   lines = [f'File {i+1}: {{"name": "{f}", "size": "'
            f'{_hsize(os.path.getsize(os.path.join(workspace, f)))}"}}'
            for i, f in enumerate(files)]
   return f"# Instruction\n{instruction}\n\n# Data\n" + "\n".join(lines)
WORKSPACE = "/content/da_workspace"
os.makedirs(WORKSPACE, exist_ok=True)
rng = np.random.default_rng(42); N = 2500
categories = ["Electronics", "Home", "Fashion", "Books", "Toys"]
dates = pd.to_datetime("2024-01-01") + pd.to_timedelta(rng.integers(0, 365, N), unit="D")
tx = pd.DataFrame({
   "order_id": np.arange(100000, 100000 + N), "date": dates,
   "customer_id": rng.integers(1, 601, N),
   "category": rng.choice(categories, N, p=[.3, .2, .25, .15, .1]),
   "region": rng.choice(["North", "South", "East", "West"], N),
   "quantity": rng.integers(1, 6, N),
   "unit_price": np.round(rng.gamma(3, 12, N) + 5, 2),
   "discount": np.round(rng.choice([0, .05, .1, .15, .2], N), 2),
})
tx["revenue"] = np.round(tx.quantity * tx.unit_price * (1 - tx.discount), 2)
tx.loc[rng.choice(N, 60, replace=False), "unit_price"] = np.nan
tx.to_csv(f"{WORKSPACE}/transactions.csv", index=False)
pd.DataFrame({
   "customer_id": np.arange(1, 601),
   "signup_year": rng.choice([2021, 2022, 2023, 2024], 600),
   "segment": rng.choice(["Consumer", "Corporate", "Home Office"], 600),
   "age": rng.integers(18, 70, 600),
}).to_excel(f"{WORKSPACE}/customers.xlsx", index=False)
print("Workspace files:", os.listdir(WORKSPACE))
INSTRUCTION = (
   "Perform an end-to-end analysis of this e-commerce dataset. Explore and "
   "join the files, clean any data-quality issues, analyze revenue trends over "
   "time, by region, category, and customer segment, and identify the key "
   "drivers of revenue. Create at least one clear visualization and SAVE it as "
   "a PNG file in the current directory. Finish with a concise, well-structured "
   "analyst-grade report of your findings and 2-3 actionable recommendations."
)
existing_imgs = set(glob.glob(f"{WORKSPACE}/*.png"))
agent = DeepAnalyzeAgent(model, tok, temperature=0.5)
t0 = time.time()
result = agent.run(INSTRUCTION, WORKSPACE, max_rounds=12,
                  max_new_tokens=3072, exec_timeout=120)
print(f"\n\nDone in {time.time()-t0:.0f}s | "
     f"{sum(1 for k,_ in result['trace'] if k=='execute')} code executions")
try:
   from IPython.display import display, Markdown, Image
   if result["answer"]:
       display(Markdown("## 📊 Final Report\n\n" + result["answer"]))
   else:
       print("No  block produced (try raising max_rounds).")
   for img in sorted(set(glob.glob(f"{WORKSPACE}/*.png")) - existing_imgs):
       print("Figure:", img); display(Image(filename=img))
except Exception:
   print("\n===== FINAL REPORT =====\n", result["answer"])

Credit: Source link

YOU MAY ALSO LIKE

SpaceX Gets FCC Approval To Deploy 1 Million Satellites For Its AI Orbital Data Center

WaterSense Raises €5.75M in Pre-Seed and Grants for AI Water Monitoring – Unite.AI

ShareTweetSendSharePin

Related Posts

SpaceX Gets FCC Approval To Deploy 1 Million Satellites For Its AI Orbital Data Center
AI & Technology

SpaceX Gets FCC Approval To Deploy 1 Million Satellites For Its AI Orbital Data Center

November 26, 2026
WaterSense Raises €5.75M in Pre-Seed and Grants for AI Water Monitoring – Unite.AI
AI & Technology

WaterSense Raises €5.75M in Pre-Seed and Grants for AI Water Monitoring – Unite.AI

November 26, 2026
BharatGen Launches Patram 1.5 with Promptable OCR and Abstention – Unite.AI
AI & Technology

BharatGen Launches Patram 1.5 with Promptable OCR and Abstention – Unite.AI

November 26, 2026
Neuralink Receives FDA Approval For ‘Pivotal’ Brain Implant Trial In ALS Patients
AI & Technology

Neuralink Receives FDA Approval For ‘Pivotal’ Brain Implant Trial In ALS Patients

November 26, 2026
Next Post
Trump says the U.S. in fighting Iran has ‘left their military alone’

Trump says the U.S. in fighting Iran has 'left their military alone'

Leave a Reply Cancel reply

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

Search

No Result
View All Result
You Can Mass-Delete All Of Your Emails On Gmail In Only A Few Clicks

You Can Mass-Delete All Of Your Emails On Gmail In Only A Few Clicks

November 22, 2026
Most security teams can’t spot a rogue AI agent, says former FBI cyber investigator

Most security teams can’t spot a rogue AI agent, says former FBI cyber investigator

November 19, 2026
OpenAI Employee Who Secretly Recorded Meetings Allegedly Affiliated With The Saudi Government

OpenAI Employee Who Secretly Recorded Meetings Allegedly Affiliated With The Saudi Government

November 24, 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!