('');
+
+ useEffect(() => {
+ const fetchStdoutContent = async () => {
+ setLoading(true);
+ setError(null);
+
+ try {
+ const content = await fetchArtifactUnified(
+ {
+ runUuid,
+ path: 'stdout.log',
+ experimentId,
+ isLoggedModelsMode: false,
+ },
+ getArtifactContent
+ );
+
+ setStdoutContent(content as string);
+ } catch (err) {
+ setError(err as Error);
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ fetchStdoutContent();
+ }, [runUuid, experimentId]);
+
+ if (loading) {
+ return (
+
+ );
+ }
+
+ if (error) {
+ return (
+
+ }
+ title={
+
+ }
+ description={
+
+ }
+ />
+
+ );
+ }
+
+ if (!stdoutContent.trim()) {
+ return (
+
+
+ }
+ description={
+
+ }
+ />
+
+ );
+ }
+
+ const syntaxStyle = theme.isDarkMode ? darkStyle : style;
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ {stdoutContent}
+
+
+
+ );
+};
\ No newline at end of file
diff --git a/mlflow/server/js/src/experiment-tracking/components/run-page/useRunViewActiveTab.tsx b/mlflow/server/js/src/experiment-tracking/components/run-page/useRunViewActiveTab.tsx
index 77bb0231fcd50..3c42f00cb7adc 100644
--- a/mlflow/server/js/src/experiment-tracking/components/run-page/useRunViewActiveTab.tsx
+++ b/mlflow/server/js/src/experiment-tracking/components/run-page/useRunViewActiveTab.tsx
@@ -18,6 +18,9 @@ export const useRunViewActiveTab = (): RunPageTabName => {
if (shouldEnableRunDetailsPageTracesTab() && tabParam === 'traces') {
return RunPageTabName.TRACES;
}
+ if (tabParam === 'stdout') {
+ return RunPageTabName.STDOUT;
+ }
if (tabParam?.match(/^(artifactPath|artifacts)/)) {
return RunPageTabName.ARTIFACTS;
}
diff --git a/mlflow/server/js/src/experiment-tracking/constants.ts b/mlflow/server/js/src/experiment-tracking/constants.ts
index c67c5ac77e75c..c88e486f972cc 100644
--- a/mlflow/server/js/src/experiment-tracking/constants.ts
+++ b/mlflow/server/js/src/experiment-tracking/constants.ts
@@ -101,6 +101,7 @@ export enum RunPageTabName {
MODEL_METRIC_CHARTS = 'model-metrics',
SYSTEM_METRIC_CHARTS = 'system-metrics',
ARTIFACTS = 'artifacts',
+ STDOUT = 'stdout',
EVALUATIONS = 'evaluations',
}
diff --git a/stdout_tab_guide.md b/stdout_tab_guide.md
new file mode 100644
index 0000000000000..bdf0eebdf9352
--- /dev/null
+++ b/stdout_tab_guide.md
@@ -0,0 +1,89 @@
+# MLflow Stdout Tab Guide
+
+The stdout tab functionality is already implemented in MLflow! This guide shows you how to use it.
+
+## How It Works
+
+MLflow captures stdout output during run execution and stores it as an artifact called `stdout.log`. The frontend displays this content in a dedicated "Stdout" tab.
+
+## Backend Usage
+
+### Basic Usage
+
+```python
+import mlflow
+
+with mlflow.start_run(log_stdout=True):
+ print("This will appear in the stdout tab!")
+ # Your code here
+```
+
+### With Custom Interval
+
+```python
+import mlflow
+
+# Log stdout every 3 seconds instead of default 5
+with mlflow.start_run(log_stdout=True, log_stdout_interval=3):
+ print("This will appear in the stdout tab!")
+ # Your code here
+```
+
+## Frontend Features
+
+The stdout tab includes:
+
+- **Syntax highlighting** for better readability
+- **Line numbers** for easy navigation
+- **Dark/light theme** support
+- **Auto-scrolling** and text wrapping
+- **Error handling** for missing or empty stdout logs
+
+## Tab Location
+
+The stdout tab appears in the run details page alongside:
+
+- Overview
+- Model metrics
+- System metrics
+- **Stdout** ← Here!
+- Artifacts
+
+## Testing
+
+Run the test script to verify everything works:
+
+```bash
+python test_stdout_tab.py
+```
+
+Then:
+
+1. Open MLflow UI (usually http://localhost:5000)
+2. Navigate to the test run
+3. Click the "Stdout" tab
+4. You should see all the captured output!
+
+## Implementation Details
+
+### Backend Files
+
+- `mlflow/utils/stdout_logging.py` - Core stdout capture logic
+- `mlflow/tracking/fluent.py` - Integration with start_run()
+
+### Frontend Files
+
+- `mlflow/server/js/src/experiment-tracking/components/run-page/RunViewStdoutTab.tsx` - Tab component
+- `mlflow/server/js/src/experiment-tracking/components/run-page/RunViewModeSwitch.tsx` - Tab switcher
+- `mlflow/server/js/src/experiment-tracking/constants.ts` - Tab definitions
+
+## Similar to Wandb
+
+This provides similar functionality to Wandb's stdout logging, where you can:
+
+- View real-time stdout output
+- Navigate through logs easily
+- Keep logs organized per run
+- Access logs directly from the UI
+
+The stdout tab is ready to use - no additional setup required!