Skip to content
| Marketplace
Sign in
Visual Studio Code>Machine Learning>ML WorkbenchNew to Visual Studio Code? Get it now.
ML Workbench

ML Workbench

oldwhisper

|
3 installs
| (0) | Free
AI assisted machine learning development, benchmarks, tuning and collaborative debugging
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ML Workbench

AI coding assistance, collaborative editing and machine-learning experiments inside VS Code. Version 0.6.0 is a stable-channel release. You can use the extension in regular VS Code; cloning or compiling Code OSS is optional.

Requirements

  • VS Code 1.100 or newer, desktop or browser. Training and shared debugging require a trusted workspace with a desktop or Codespaces runtime.
  • Your own OpenAI API key for AI chat and autocomplete. API usage is billed by your provider. No key is required for collaboration.
  • Python and the relevant packages only for local training, Python debugging or static analysis.
  • The host needs the official cloudflared executable for temporary internet invitations. Guests do not need cloudflared. Local two-window collaboration does not need it.

Install and start

Install the VSIX through Extensions → Install from VSIX, or install the Marketplace listing when published. Open a project folder, then click ML Code in the activity bar. The Chat view contains the assistant; the Collaboration view contains host/join actions. Experiments opens the Chakra UI dashboard.

Run ML Workbench: Set OpenAI API Key from the Command Palette, or use Key in the sidebar. The key is stored through VS Code SecretStorage, never in the webview. Choose your model and project instructions in the mlWorkbench settings. The extension uses the OpenAI Responses API; a compatible custom fine-tuned model ID can be configured, but no fine-tuning job is automatically submitted.

AI chat, autocomplete and code edits

Chat streams formatted Markdown with headings, tables, lists, syntax-highlighted code and copy controls. Attach active code optionally sends a bounded region around the cursor or the current selection. Follow-up questions use recent conversation history. Stop cancels generation; New chat clears the current conversation.

Enable autocomplete using the sidebar toggle or ML Code: Toggle AI Autocomplete. Suggestions appear as native ghost text. Tab accepts, Esc dismisses, and Alt+Backslash requests a suggestion. Supported languages include Markdown, plain text, JSON, YAML, HTML, CSS, Python, JavaScript, TypeScript, React, Go, Rust, Java, C/C++, C#, SQL and shell. Nearby source is sent to your configured OpenAI model only while this option is enabled. Requests are debounced, cached and cancelled when stale.

Select code and use the context-menu Explain, Fix or Write Tests actions. Assistant code blocks offer Review edit and Apply edit. Review opens a native diff. Apply checks the original document version and refuses a stale edit. Generated code is never executed automatically by chat.

Collaborative files and invitations

  1. Both people install this extension and open local workspace folders. The guest can use an empty folder.
  2. The host chooses ML Code: Host Collaboration Session.
  3. Choose Local test for two windows on one machine, or Internet invitation for a temporary encrypted tunnel.
  4. Choose Share a folder or individual files. Expand folders in the preview, toggle whole folders or individual files, then confirm. Only the chosen files are exposed. Use Share folder later to add more.
  5. Choose Copy Collaboration Invitation, then Can edit shared files or Read only.
  6. Send the invitation through your normal communication channel.
  7. The other person chooses Join Collaboration Session and pastes it.

The invitation includes an automatically generated session token. It is not an OpenAI token and does not require any cloud billing account. Treat the invitation as access to the shared session. Invitations expire after eight hours. Revoke Collaboration Invitations disconnects existing guests and invalidates old guest tokens; copy a new invitation to invite again. Leave Collaboration Session ends the host's session and closes its temporary tunnel.

Shared files appear in the guest's Explorer as a separate virtual workspace folder. Both people can edit them. Yjs CRDT updates merge concurrent changes; overlapping edits are flagged for review. A merge cannot establish that contradictory code changes are logically correct—use the diff, diagnostics and tests. The host manages adding files. Guests cannot create, rename or delete arbitrary host files. Text files are limited to 512 KB, with up to 200 shared files and an 8 MB initial workspace-text budget.

Use Share Active File to add another file. The host's original text documents remain normal VS Code documents. Saving a guest file requests a save of the corresponding synchronized host document. If the connection ends, unsaved editor text remains available; save a local copy before closing it if needed. Sessions are not automatically resumed after a host restart.

Undo, history and safe restore

When a shared editable file is focused, the extension routes Cmd/Ctrl+Z to undo your own CRDT edits, preserving peer edits. Cmd/Ctrl+Shift+Z redoes them. The same actions are available as Undo My Shared Edit and Redo My Shared Edit in the Command Palette.

Shared File History opens a Chakra UI timeline. Review opens a native diff against a selected revision. Restore creates a new shared revision rather than deleting history. If anyone edits after your review, restoration is rejected until you review again. Read-only guests cannot restore versions.

The host saves bounded history beneath .ml-workbench/collaboration-history. Saved Collaboration History opens an archive after leaving the live session. Keep that folder private and excluded from source control; it contains shared source snapshots. Retention is up to 200 versions per file within a 32 MB session-history budget. History is not a substitute for Git or backups.

Shared debugging

The host starts a normal debugger and chooses Share Active Debugger. Guests choose Join Shared Debugger and use the normal VS Code Run and Debug UI to inspect threads, stack frames, scopes and variables. Shared source paths map to the guest's shared files. Common credential-named variables are redacted.

Debug control is off initially. The host can enable Toggle Guest Debug Control so editing guests may step, continue, pause and set source breakpoints in shared files. Read-only guests cannot control the debugger. The host owns and runs the process. Guests cannot launch arbitrary host processes, evaluate arbitrary expressions, restart the host's debugger or set arbitrary variable values through this proxy.

For Python, install debugpy in the selected Python environment and use Start Python Debugger. The normal Python debug adapter runs on the host; guests do not need the host's Python environment to inspect the shared process.

Python setup and experiments

Create a project environment and install the packages you need:

python -m venv .venv
# macOS/Linux
.venv/bin/python -m pip install torch tensorflow ruff debugpy
# Windows
.venv\Scripts\python.exe -m pip install torch tensorflow ruff debugpy

Install either framework rather than both if your project uses only one. Set mlWorkbench.pythonPath when using another interpreter. An empty setting uses the workspace .venv when present, otherwise python3.

Try ML demo opens a generated PyTorch example and the experiment dashboard. You can also choose PyTorch or TensorFlow, select an MLP or linear classifier, and Scaffold model. Review the saved script, then Run training. Stop training cancels it. Generated examples use a reproducible synthetic training/validation split, write metrics atomically, and save run history and checkpoints. They are examples, not production dataset pipelines.

Training writes .ml-workbench/metrics.json in this format:

{"metrics":[{"step":0,"loss":0.5,"accuracy":0.8,"valLoss":0.6,"valAccuracy":0.75,"durationMs":12.5}]}

Steps must be unique nonnegative integers; metrics must be finite, nonnegative numbers; accuracies lie between zero and one. Plot training or validation loss/accuracy and step duration. View past run loads recorded history. Analyze Python runs Ruff, while ML-specific heuristic diagnostics highlight common mistakes.

Benchmarks and tuning

Set validation thresholds, Generate tests, then Run tests. The extension bundles a Jest runner, so no global Jest installation is needed. These tests assert recorded model metrics; they do not replace tests of your model's input/output contracts, data preprocessing or dataset quality.

Propose & apply tuning validates a bounded LLM candidate, selects a bandit trial and writes .ml-workbench/hyperparameters.json. Generated scripts reload the learning rate and batch size each step. Record an observed reward, or Run 3 Measured Tuning Trials to train three configurations and use actual held-out validation accuracy as feedback. Failed or cancelled runs receive no reward. This is a bounded epsilon-greedy multi-armed bandit, not a general reinforcement-learning agent or distributed search service.

Privacy and permissions

AI requests may include your prompt, bounded attached source and recent chat history. Response storage is disabled in the API request, but the provider's own data policies still apply. Autocomplete is opt-in. Raw model HTML and unsafe URL schemes are not executed, and Markdown images are not fetched remotely.

Collaboration sends selected file content, edits, cursor presence and, when enabled, debugger state to invited peers. Internet mode routes that traffic through Cloudflare Tunnel. The extension's relay state is in host memory; bounded source history is written locally on the host. OpenAI API keys are not included in invitations or shared state. The extension does not add an analytics or telemetry service.

Updates, limitations and support

Once published, Marketplace distributes new versions through VS Code's normal extension-update mechanism. Users control the Extensions: Auto Update setting. There is no separate self-updater or remote-code download mechanism in this extension. Existing collaboration sessions should be ended before updating both clients to the same release.

This release has local two-editor, real Python-debugger, concurrent-edit, permission, history/restore and Markdown-rendering tests. Windows/Linux runtime binaries are bundled for the Jest resolver, but complete operating-system usability testing is still needed. Temporary tunnels have no uptime guarantee; production hosting, organizational administration, general-purpose remote execution and arbitrary debugger evaluation are not included. Custom datasets, GPU/distributed training and custom OpenAI fine-tuning jobs need separate validation.

Troubleshooting: missing commands usually mean the extension is disabled or the wrong editor profile is open; use Extensions → Enable and Reload Window. A failed invitation may be expired, revoked, local-only or unreachable. A read-only invitation cannot edit. If restoration reports a changed file, review again. If Python tools cannot import, install them in the executable selected by mlWorkbench.pythonPath. For an API failure, check your key, model access, quota and billing without posting your key in an issue.

Stable 0.6.0: completion and formatting

Autocomplete replaces the current word (including text after the cursor) or a single-line selection. It preserves your typed prefix and cancels stale requests. Tab uses the native VS Code acceptance action. Markdown completions follow the document structure and preserve real code fences. Requests start after 180 ms of idle time, use a short output budget, and stop after eight seconds; provider/network latency still varies. An optional mlWorkbench.completionModel selects a separate model for autocomplete.

mlWorkbench.formatOnAccept defaults to true. Accepted completions use an installed range formatter when available, with editor indentation options. Formatting edits outside the affected lines or against a changed document are skipped. Install/configure your preferred language formatter for its normal formatting rules. Select text and use ML Code: Complete or Replace Selection from the context menu or Command Palette for multiline replacements; VS Code's inline API supports single-line replacement ranges.

Python setup and missing dependencies

In Experiments → Build & validate, select PyTorch or TensorFlow, then choose Setup environment. Or run ML Code: Setup Python Environment. Setup reuses mlWorkbench.pythonPath or the workspace .venv; otherwise it creates .venv using an installed Python interpreter, preferring Python 3.12 or 3.11. It installs the selected framework, Ruff and debugpy with that interpreter's pip, then verifies real imports. Progress and installation logs appear in training output, and setup can be cancelled. Existing environments are never deleted.

Python must be installed first. If pip cannot find a wheel for your Python/platform, use Python 3.11 or 3.12 and select that environment. GPU/CUDA package choices remain project-specific. Setup installs the framework you chose; repeat for the other framework if needed. Training checks framework dependencies before launch and identifies the selected interpreter and missing modules instead of starting a known-broken run. Custom scripts may require additional project-specific packages.

Browser-based VS Code

The same VSIX includes a browser entry point. On vscode.dev, install the Marketplace extension (or use Install from VSIX if available), set your own OpenAI key, and enable autocomplete. Chat, review/apply, language-aware autocomplete, model scaffolding, benchmark generation and saved metrics viewing work without a local Node process. Saving generated files requires a writable workspace; GitHub repository views may be read-only. OpenAI requests run directly from the extension worker using your key stored by VS Code; browser/network restrictions can affect connectivity.

For training, package installation, collaboration hosting and shared debugging, open the workspace in GitHub Codespaces or desktop VS Code. In Codespaces the extension runs in the remote workspace host and uses that environment's Python, packages and network. Install the extension in the Codespace, run Setup environment there, and install cloudflared there if hosting an internet invitation. A connected runtime is required for these actions; a plain vscode.dev tab cannot run Python processes or host the relay. Browser-only collaboration joining is not included in 0.6.0.

Folder sharing retains relative paths and shows expandable folders in the Collaboration view and dashboard. Dependency/build folders, .ml-workbench, secrets covered by the path rules, symlinks, binaries and files over 512 KB are excluded. Review the preview before sharing. New files are added by choosing Share folder again; creating, deleting and renaming files is not automatically synchronized.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft