ML WorkbenchAI 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
Install and startInstall 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 editsChat 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
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 restoreWhen 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 debuggingThe 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 experimentsCreate a project environment and install the packages you need:
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:
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 tuningSet 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 permissionsAI 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 supportOnce 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 formattingAutocomplete 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
Python setup and missing dependenciesIn Experiments → Build & validate, select PyTorch or TensorFlow, then choose Setup environment. Or run ML Code: Setup Python Environment. Setup reuses 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 CodeThe same VSIX includes a browser entry point. On 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 Folder sharing retains relative paths and shows expandable folders in the Collaboration view and dashboard. Dependency/build folders, |