• bitcoinBitcoin(BTC)$80,814.000.93%
  • Midas Fasanara Global EuroMidas Fasanara Global Euro(MGLOEURO)$111,813.00-0.36%
  • ethereumEthereum(ETH)$2,352.721.30%
  • tetherTether(USDT)$1.000.01%
  • binancecoinBNB(BNB)$744.930.18%
  • rippleXRP(XRP)$1.332.33%
  • usd-coinUSDC(USDC)$1.000.01%
  • solanaSolana(SOL)$101.550.95%
  • tronTRON(TRX)$0.3310570.52%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.03-0.60%
  • zcashZcash(ZEC)$1,305.725.91%
  • HyperliquidHyperliquid(HYPE)$81.844.60%
  • dogecoinDogecoin(DOGE)$0.0792041.86%
  • moneroMonero(XMR)$598.97-1.64%
  • USDSUSDS(USDS)$1.000.00%
  • whitebitWhiteBIT Coin(WBT)$77.610.90%
  • chainlinkChainlink(LINK)$11.622.53%
  • leo-tokenLEO Token(LEO)$9.424.25%
  • cardanoCardano(ADA)$0.2067280.74%
  • nearNEAR Protocol(NEAR)$4.694.59%
  • stellarStellar(XLM)$0.1716751.40%
  • bitcoin-cashBitcoin Cash(BCH)$294.263.87%
  • RainRain(RAIN)$0.007200-0.20%
  • Ethena USDeEthena USDe(USDE)$1.000.03%
  • daiDai(DAI)$1.00-0.02%
  • litecoinLitecoin(LTC)$57.381.33%
  • uniswapUniswap(UNI)$7.11-0.22%
  • avalanche-2Avalanche(AVAX)$9.021.19%
  • CantonCanton(CC)$0.0998230.88%
  • USD1USD1(USD1)$1.000.01%
  • suiSui(SUI)$0.942.21%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.232.43%
  • hedera-hashgraphHedera(HBAR)$0.076416-0.91%
  • tether-goldTether Gold(XAUT)$4,043.620.79%
  • Global DollarGlobal Dollar(USDG)$1.00-0.03%
  • paypal-usdPayPal USD(PYUSD)$1.000.02%
  • BittensorBittensor(TAO)$257.372.93%
  • shiba-inuShiba Inu(SHIB)$0.0000051.59%
  • quant-networkQuant(QNT)$199.02-1.76%
  • EthenaEthena(ENA)$0.2089550.19%
  • crypto-com-chainCronos(CRO)$0.0540201.47%
  • Ripple USDRipple USD(RLUSD)$1.00-0.02%
  • BitwayBitway(BTW)$1.7350.38%
  • MemeCoreMemeCore(M)$1.0713.29%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.150.16%
  • Circle USYCCircle USYC(USYC)$1.140.01%
  • okbOKB(OKB)$109.780.62%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • aaveAave(AAVE)$134.58-0.18%
  • pepePepe(PEPE)$0.00000514.07%
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

Discord Public Server Messages May Be Soon Searchable On Google, But You Can Opt Out

How To Change And Customize Your Android Auto Display

ShareTweetSendSharePin

Related Posts

Discord Public Server Messages May Be Soon Searchable On Google, But You Can Opt Out
AI & Technology

Discord Public Server Messages May Be Soon Searchable On Google, But You Can Opt Out

October 27, 2026
How To Change And Customize Your Android Auto Display
AI & Technology

How To Change And Customize Your Android Auto Display

October 27, 2026
GSA Expands Anthropic OneGov Agreement with 40% Claude Discount – Unite.AI
AI & Technology

GSA Expands Anthropic OneGov Agreement with 40% Claude Discount – Unite.AI

October 27, 2026
Stellantis Selects Amperity to Connect Customer Data and Personalize Experiences – Unite.AI
AI & Technology

Stellantis Selects Amperity to Connect Customer Data and Personalize Experiences – Unite.AI

October 27, 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
Trump says ‘it’s early’ to talk about a 2028 Vance endorsement

Trump says ‘it’s early’ to talk about a 2028 Vance endorsement

October 21, 2026
A single antimatter particle in a cage opens door to ‘revolutionary’ physics – Nature

A single antimatter particle in a cage opens door to ‘revolutionary’ physics – Nature

October 21, 2026
Judge issues indefinite block on White House media ban

Judge issues indefinite block on White House media ban

October 25, 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!