• bitcoinBitcoin(BTC)$80,562.000.48%
  • Midas Fasanara Global EuroMidas Fasanara Global Euro(MGLOEURO)$111,813.00-0.36%
  • ethereumEthereum(ETH)$2,340.650.57%
  • tetherTether(USDT)$1.000.00%
  • binancecoinBNB(BNB)$741.92-0.33%
  • rippleXRP(XRP)$1.331.30%
  • usd-coinUSDC(USDC)$1.00-0.01%
  • solanaSolana(SOL)$101.040.27%
  • tronTRON(TRX)$0.3310330.57%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.03-0.59%
  • zcashZcash(ZEC)$1,298.475.23%
  • HyperliquidHyperliquid(HYPE)$81.633.89%
  • dogecoinDogecoin(DOGE)$0.0787921.18%
  • moneroMonero(XMR)$600.80-1.26%
  • USDSUSDS(USDS)$1.00-0.05%
  • whitebitWhiteBIT Coin(WBT)$77.380.44%
  • chainlinkChainlink(LINK)$11.561.70%
  • leo-tokenLEO Token(LEO)$9.050.14%
  • cardanoCardano(ADA)$0.205443-0.37%
  • nearNEAR Protocol(NEAR)$4.653.53%
  • stellarStellar(XLM)$0.1703030.51%
  • bitcoin-cashBitcoin Cash(BCH)$293.534.08%
  • RainRain(RAIN)$0.007161-0.47%
  • Ethena USDeEthena USDe(USDE)$1.000.02%
  • daiDai(DAI)$1.00-0.03%
  • litecoinLitecoin(LTC)$57.040.67%
  • uniswapUniswap(UNI)$7.06-0.86%
  • avalanche-2Avalanche(AVAX)$8.950.19%
  • CantonCanton(CC)$0.099096-0.47%
  • USD1USD1(USD1)$1.000.02%
  • suiSui(SUI)$0.931.27%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.231.81%
  • hedera-hashgraphHedera(HBAR)$0.075864-1.83%
  • tether-goldTether Gold(XAUT)$4,050.401.06%
  • Global DollarGlobal Dollar(USDG)$1.00-0.03%
  • paypal-usdPayPal USD(PYUSD)$1.00-0.02%
  • BittensorBittensor(TAO)$255.321.80%
  • quant-networkQuant(QNT)$198.93-1.58%
  • shiba-inuShiba Inu(SHIB)$0.0000050.06%
  • EthenaEthena(ENA)$0.2087520.18%
  • crypto-com-chainCronos(CRO)$0.0537380.61%
  • BitwayBitway(BTW)$1.7447.72%
  • Ripple USDRipple USD(RLUSD)$1.00-0.04%
  • MemeCoreMemeCore(M)$1.0711.63%
  • Circle USYCCircle USYC(USYC)$1.140.01%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.15-0.01%
  • okbOKB(OKB)$109.39-0.03%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • aaveAave(AAVE)$133.40-1.30%
  • OndoOndo(ONDO)$0.4195181.70%
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

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

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
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
Rockstar Workers In The UK Will Hold A Union Vote Just As GTA 6 Is Released
AI & Technology

Rockstar Workers In The UK Will Hold A Union Vote Just As GTA 6 Is Released

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
CoreWeave, Nscale Put Neocloud Economics in Focus

CoreWeave, Nscale Put Neocloud Economics in Focus

October 21, 2026
Cattle set loose after truck crashes on Kansas City highway

Cattle set loose after truck crashes on Kansas City highway

October 22, 2026
Trump announces Fraud Whistleblower Incentive Program

Trump announces Fraud Whistleblower Incentive Program

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