diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000000..f6f38849b4 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,537 @@ +# DKUBEX Changes Summary + +## Table of Contents + +### New Features +- [1. PyTorch Trace Viewer](#1-pytorch-trace-viewer) +- [2. Grafana Logs Integration](#2-grafana-logs-integration) +- [3. Project-Based Experiment Filtering](#3-project-based-experiment-filtering) +- [4. Enhanced Metric Charts](#4-enhanced-metric-charts) + +### Feature Flags & Configuration +- [Disabled Features](#disabled-features) + +### UI/UX Improvements +- [Component IDs for Testing/Accessibility](#component-ids-for-testingaccessibility) +- [Performance & Limits](#performance--limits) +- [Metric Filtering Enhancement](#metric-filtering-enhancement) + +### Routing & Navigation +- [React Router Updates](#react-router-updates) + +### File Handling +- [Trace File Support](#trace-file-support) +- [Artifact View Styling](#artifact-view-styling) + +### Bug Fixes & Improvements +- [Plot Layout Parsing](#plot-layout-parsing) +- [Metric History Sampling](#metric-history-sampling) +- [Run View Metric Charts UI Enhancements](#run-view-metric-charts-ui-enhancements) + +### Build & Configuration +- [NPM Configuration](#npm-configuration) +- [Design System Update](#design-system-update) +- [Setup Script Removal](#setup-script-removal) +- [Type Updates](#type-updates) + +### Docker Image Build +- [Dockerfile Changes](#dockerfile-changes) + +--- + +## New Features + +### 1. PyTorch Trace Viewer + +**Files:** +- `mlflow/server/js/public/lib/artifact-trace-viewer/trace_embedding.html` (new) +- `mlflow/server/js/public/lib/artifact-trace-viewer/trace_viewer_full.html` (new) +- `mlflow/server/js/src/experiment-tracking/components/artifact-view-components/ShowArtifactTraceView.tsx` (new) +- `mlflow/server/js/src/experiment-tracking/components/artifact-view-components/ShowArtifactTraceView.css` (new) + +**Description:** Added support for viewing PyTorch trace files (`.pt.trace.json`, `.pt.trace.json.gz`) as artifacts with an embedded trace viewer interface. + +**Key Implementation:** + +```typescript +// ShowArtifactTraceView.tsx - Main component structure +class ShowArtifactTraceView extends Component { + fetchArtifacts() { + const artifactLocation = getArtifactLocationUrl(this.props.path, this.props.runUuid); + this.props.getArtifact(artifactLocation, true) + .then((tracebindata: ArrayBufferLike) => { + const uint8Array = new Uint8Array(tracebindata); + // Gzip files start with the magic number 0x1f 0x8b + if (uint8Array[0] === 0x1f && uint8Array[1] === 0x8b) { + data = pako.ungzip(uint8Array, { to: 'string' }); + } else { + data = new TextDecoder().decode(uint8Array); + } + this.setState({ tracedata: data, loading: false, path: this.props.path }); + }); + } + + render() { + return ( +
+ ++++ ++++
++++ ); ++++ } ++++ } ++++ ++++ /** Fetches artifacts and updates component state with the result */ ++++ fetchArtifacts() { ++++ const artifactLocation = getArtifactLocationUrl(this.props.path, this.props.runUuid); ++++ this.props ++++ .getArtifact(artifactLocation, true) ++++ .then((tracebindata: ArrayBufferLike) => { ++++ const uint8Array = new Uint8Array(tracebindata); ++++ let data = ''; ++++ // Gzip files start with the magic number 0x1f 0x8b ++++ if (uint8Array[0] === 0x1f && uint8Array[1] === 0x8b) { ++++ try { ++++ data = pako.ungzip(uint8Array, { to: 'string' }); ++++ } catch (error) { ++++ console.error('Decompression error:', error); ++++ } ++++ } else { ++++ data = new TextDecoder().decode(uint8Array); ++++ } ++++ this.setState({ tracedata: data, loading: false, path: this.props.path }); ++++ }) ++++ .catch((error: Error) => { ++++ this.setState({ error: error, loading: false, path: this.props.path }); ++++ }); ++++ } ++++ ++++ traceViewDataHandler(event: MessageEvent) { ++++ const data = event.data || {} ++++ if (data.msg === 'ready') { ++++ if (this.iframeRef.current && this.iframeRef.current.contentWindow) { ++++ this.iframeRef.current.focus(); ++++ this.iframeRef.current.contentWindow.postMessage( ++++ { msg: 'data', data: this.state.tracedata }, ++++ '*' ++++ ); ++++ } ++++ } ++++ } ++++} ++++ ++++export default ShowArtifactTraceView; +++diff --git a/mlflow/server/js/src/experiment-tracking/components/experiment-page/components/PromptLabOnboarding.tsx b/mlflow/server/js/src/experiment-tracking/components/experiment-page/components/PromptLabOnboarding.tsx +++index e6b01c8d6..e8b381ac2 100644 +++--- a/mlflow/server/js/src/experiment-tracking/components/experiment-page/components/PromptLabOnboarding.tsx ++++++ b/mlflow/server/js/src/experiment-tracking/components/experiment-page/components/PromptLabOnboarding.tsx +++@@ -35,6 +35,7 @@ export const PromptLabOnboarding = ({ onDismissed }: { onDismissed?: () => void +++ +++ return ( +++ void +++ description='"Learn more" button in the modal for the prompt engineering onboarding' +++ /> +++ */} +++- */} ++-