• bitcoinBitcoin(BTC)$64,078.000.46%
  • ethereumEthereum(ETH)$1,793.731.40%
  • tetherTether(USDT)$1.000.02%
  • binancecoinBNB(BNB)$574.510.06%
  • usd-coinUSDC(USDC)$1.000.01%
  • rippleXRP(XRP)$1.110.16%
  • solanaSolana(SOL)$77.65-1.42%
  • tronTRON(TRX)$0.329896-0.35%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.033.05%
  • HyperliquidHyperliquid(HYPE)$67.05-1.52%
  • dogecoinDogecoin(DOGE)$0.0741540.42%
  • USDSUSDS(USDS)$1.000.00%
  • RainRain(RAIN)$0.0144530.35%
  • leo-tokenLEO Token(LEO)$9.52-0.92%
  • zcashZcash(ZEC)$501.212.16%
  • whitebitWhiteBIT Coin(WBT)$56.06-0.44%
  • stellarStellar(XLM)$0.1904100.25%
  • cardanoCardano(ADA)$0.166166-1.35%
  • moneroMonero(XMR)$320.540.95%
  • chainlinkChainlink(LINK)$7.981.29%
  • CantonCanton(CC)$0.1341730.28%
  • bitcoin-cashBitcoin Cash(BCH)$245.391.41%
  • daiDai(DAI)$1.000.00%
  • USD1USD1(USD1)$1.000.03%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.641.07%
  • Ethena USDeEthena USDe(USDE)$1.000.01%
  • litecoinLitecoin(LTC)$44.691.07%
  • Global DollarGlobal Dollar(USDG)$1.00-0.04%
  • Circle USYCCircle USYC(USYC)$1.130.02%
  • hedera-hashgraphHedera(HBAR)$0.069922-0.54%
  • suiSui(SUI)$0.742.34%
  • avalanche-2Avalanche(AVAX)$6.71-0.43%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • paypal-usdPayPal USD(PYUSD)$1.000.00%
  • shiba-inuShiba Inu(SHIB)$0.0000041.44%
  • crypto-com-chainCronos(CRO)$0.055690-1.60%
  • tether-goldTether Gold(XAUT)$4,103.87-0.11%
  • nearNEAR Protocol(NEAR)$1.91-1.68%
  • uniswapUniswap(UNI)$3.470.31%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.13-0.43%
  • BittensorBittensor(TAO)$212.89-0.29%
  • pax-goldPAX Gold(PAXG)$4,107.45-0.20%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.057902-1.04%
  • MemeCoreMemeCore(M)$1.359.22%
  • okbOKB(OKB)$80.55-0.10%
  • AsterAster(ASTER)$0.63-0.33%
  • dexeDeXe(DEXE)$35.774.71%
  • HTX DAOHTX DAO(HTX)$0.000002-0.82%
  • OndoOndo(ONDO)$0.3301363.35%
  • usddUSDD(USDD)$1.00-0.13%
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

YOU MAY ALSO LIKE

Meta Deactivates Feature That Let You Generate AI Images Of Any Public Instagram Account

Mamdani Announces New Click-To-Cancel Rule For New York City

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

ShareTweetSendSharePin

Related Posts

Meta Deactivates Feature That Let You Generate AI Images Of Any Public Instagram Account
AI & Technology

Meta Deactivates Feature That Let You Generate AI Images Of Any Public Instagram Account

July 11, 2026
Mamdani Announces New Click-To-Cancel Rule For New York City
AI & Technology

Mamdani Announces New Click-To-Cancel Rule For New York City

July 10, 2026
57% of enterprises have watched AI agents be confidently wrong. The fix is an agentic context layer, but who has one?
AI & Technology

57% of enterprises have watched AI agents be confidently wrong. The fix is an agentic context layer, but who has one?

July 10, 2026
Kyutai Releases MuScriptor: An Open-Weight Decoder-Only Transformer for Multi-Instrument Music Transcription to MIDI
AI & Technology

Kyutai Releases MuScriptor: An Open-Weight Decoder-Only Transformer for Multi-Instrument Music Transcription to MIDI

July 10, 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
Her Daughter’s Ex Is Financially Ruining Her

Her Daughter’s Ex Is Financially Ruining Her

July 10, 2026
Coast Guard rescues injured mariner off of Oregon coast

Coast Guard rescues injured mariner off of Oregon coast

July 10, 2026
NBA star Steph Curry signs apparel deal with Chinese company Li-Ning

NBA star Steph Curry signs apparel deal with Chinese company Li-Ning

July 9, 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!