Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
📚 Mintlify Preview Links✨ Added (8 total)📄 Pages (8)
📝 Changed (2 total)📄 Pages (1)
⚙️ Other (1)
🤖 Generated automatically when Mintlify deployment succeeds |
🔗 Link Checker Results✅ All links are valid! No broken links were detected. Checked against: https://wb-21fd5541-sandboxes.mintlify.app |
ReviewOverall the docs are well-structured and cover the right topics. The API patterns are mostly accurate against the SDK. Flagging the following issues before merge. Must Fix1. Both show: sandbox.wait_until_complete(timeout=3600.0)
print(f"Exit code: {sandbox.returncode}")
sandbox.wait_until_complete(timeout=3600.0).result()
print(f"Exit code: {sandbox.returncode}")2. Credential propagation claim is inaccurate
This is not true today. W&B credentials authenticate you to the sandbox service (creating/managing sandboxes via ATC), but they are not propagated inside the sandbox container. Code running inside the sandbox has no access to your W&B API key, so Suggested rewrite: "Sandboxes authenticate using your existing W&B credentials. To use W&B or Weave inside a sandbox, pass your API key using the Secrets Manager or environment variables." 3. sandbox.exec(["echo", "Hello, world.", ">", "hello.txt"]).result()When args are passed as a list, sandbox.exec(["sh", "-c", "echo 'Hello, world.' > hello.txt"]).result()Also, 4. LangChain agent tutorial should be replaced LangChain is a direct competitor. We should not be featuring their library in our docs. Beyond the competitive concern, the code has technical issues:
Recommend replacing with a framework-agnostic example, or using Weave. 5. This is the only place in the docs that imports from Should Fix6. Typos
7. Links use 8. Line number references off by 2 "Lines 29-31" should be "Lines 27-29" (the three print statements). "Lines 35-36" should be "Lines 33-34" (read_file and write_bytes). 9. |
Review (Round 3)Cross-referenced all code snippets against the SDK source ( Must Fix1. result = sandbox.exec(["python", "demo.py"], check=True).result()
print("Script output:")
print(result) # prints ProcessResult(stdout='...', stderr='...', returncode=0, stdout_bytes=b'...', ...)
2. If any code still shows: result = sandbox.wait_until_complete(timeout=3600.0).result()
print(f"Standard output: {result.stdout}")This raises sandbox.wait_until_complete(timeout=3600.0).result()
print(f"Exit code: {sandbox.returncode}")3. Auth language still slightly misleading
This conflates authenticating to the sandbox service (which does use your W&B credentials) with using W&B inside the sandbox (which does not work automatically). Credentials are not propagated into the container. Reword to: "W&B authenticates your identity when you create and manage sandboxes. To use W&B or Weave inside a sandbox, pass your API key using the Secrets Manager or Should Fix4. result = sandbox.wait_until_complete(...).result()This assigns a sandbox.wait_until_complete(timeout=3600.0).result()
print(f"Exit code: {sandbox.returncode}")5. Context manager + with Sandbox.run("python", "train.py") as sandbox:
sandbox.wait_until_complete(timeout=3600.0).result()The context manager calls Interactive sandbox (context manager): with Sandbox.run() as sandbox:
result = sandbox.exec(["python", "train.py"]).result()
print(result.stdout)
# sandbox automatically stopped on exitFire-and-forget with main command (no context manager): sandbox = Sandbox.run("python", "train.py")
sandbox.wait_until_complete(timeout=3600.0).result()
print(f"Exit code: {sandbox.returncode}")6. Missing PAUSED state from lifecycle page The SDK defines 7. The "Keep the sandbox running" section shows 8. The Session example calls Low Severity9. Missing 10. Stray 11. Broken anchor in secrets.mdx - 12. File naming inconsistency - Tutorial files use underscores ( |
|
|
||
| For more information about `Sandbox.exec()` and its parameters, see the [`Sandbox.exec()`](https://docs.coreweave.com/products/coreweave-sandbox/client/ref/core/sandbox#exec) reference documentation. | ||
|
|
||
| #### Keep the sandbox running for additional commands |
There was a problem hiding this comment.
This might be better promoted to an H3 and titled something like "Keep a sandbox running for a period of time". or even "indefinitely". The example is indefinite but also makes it pretty obvious that you could sleep for a given period instead.
mdlinville
left a comment
There was a problem hiding this comment.
Pre-approving after taking a first pass through all of the pages in this PR. Let me know if you'd like a second look at anything before you merge.
Description
W&B Sandboxes (Private Preview). Currently documents:
Things to add?