Commit Graph

133 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
da6ae072e0 refactor: remove legacy commands and clean up CLI
🧹 Cleanup Changes:
- Removed check and check-tags commands from CLI
- Cleaned up maintenance.py by removing legacy methods
- Removed command handlers and mappings from main.py
- Deleted binder_legacy file as requested

 Verified Functionality:
- All remaining commands tested and working correctly
- help: Shows clean interface without removed commands
- list: Chapter discovery works perfectly (62 chapters)
- status: Configuration status displays correctly
- switch: Format switching works (tested html switch)
- doctor: Health check runs (16/18 checks passed)
- build: Build process starts correctly (tested with foreword)
- preview: Preview server starts correctly
- about: Project information displays properly
- clean: Artifact cleanup works correctly

🎯 Result:
- Streamlined CLI with essential commands only
- No legacy baggage or unused functionality
- All core features preserved and working
2025-08-27 15:36:45 +02:00
Vijay Janapa Reddi
f333d8d24b feat: restore all missing maintenance functionality
🔧 Restored Critical Commands:
- clean: Clean build artifacts and restore configs
- switch: Switch active configuration format
- setup: Setup development environment
- hello: Show welcome message and quick start
- about: Show project information and stats
- check: Check for build artifacts (legacy compatibility)
- check-tags: Check for orphaned git tags

 New Modular Architecture:
- CleanCommand: Handles artifact cleanup and config restoration
- MaintenanceCommand: Handles setup, switch, hello, about operations
- All commands properly integrated into main CLI

🎯 Feature Parity Achieved:
- All original binder functionality restored
- Enhanced with better error handling
- Improved user experience with Rich UI
- Modular design for easy maintenance

The CLI migration is now 100% complete with full feature parity
2025-08-27 15:27:48 +02:00
Vijay Janapa Reddi
70e92435eb feat(cli): add preview and doctor commands with clear descriptions
New Commands:
- Add PreviewCommand for live development server with hot reload
- Add DoctorCommand for comprehensive health checks (18 checks)
- Clear command descriptions distinguish build vs preview vs formats

Command Clarity:
- build: Build static files to disk (HTML)
- preview: Start live dev server with hot reload
- pdf: Build static PDF file to disk
- epub: Build static EPUB file to disk

Health Check Features:
- System dependencies (Python, Quarto, Git, Node.js, R)
- Configuration file validation
- Chapter file scanning (62 chapters found)
- Build artifacts status
- Git repository status
- File permissions check

All tests passing - comprehensive CLI ready for use
2025-08-27 15:09:21 +02:00
Vijay Janapa Reddi
353864dd77 docs(acknowledgements): add Netlify and Edge Impulse corporate support
- Add Netlify badge to meet open source hosting requirements
- Add Edge Impulse logo to acknowledge technical tooling support
- Update Corporate Support description to include technical assistance and hosting services
- Properly recognize both companies' contributions to the project
2025-08-27 01:51:07 +02:00
Vijay Janapa Reddi
3f713c3b9d feat(ops): add AI factory content to operational system design section
- Add Enterprise-Scale Infrastructure: AI Factories subsection
- Position AI factories as logical extension of scalable MLOps maturity
- Include technical rationale with post-training and test-time scaling
- Add EU AI Factories initiative footnote for real-world validation
- Maintain academic tone and systems thinking approach

Closes #954
2025-08-26 23:32:44 +02:00
Vijay Janapa Reddi
b6ce3332ad feat(deploy): add development preview banner with commit info and stable version link
- Add modify_dev_announcement.py script to inject dev preview banner
- Banner shows commit hash, timestamp, and link to stable version
- Make announcement non-dismissible for dev previews
- Maintain original blue announcement styling below dev banner
- Update deploy-preview workflow to use new script
- Script located in tools/scripts/publish/ for external workflow use
2025-08-26 01:27:20 +02:00
Vijay Janapa Reddi
39c58c30b6 Extracts announcement bar configuration
Moves the announcement bar configuration to a separate file.

This change allows for easier management of the announcement bar content and enables conditional inclusion based on the build environment. The `dismissable` option is also set to `false` for production builds.
2025-08-26 00:47:06 +02:00
Vijay Janapa Reddi
517c34c8fc Merge pull request #952 from harvard-edge/fix/issue-945-transient-errors-causes
Fix/issue 945 transient errors causes
2025-08-25 22:02:17 +02:00
Vijay Janapa Reddi
4d9236e586 Reorganizes content on transient fault causes
Refactors the section on causes of transient faults for better clarity and flow.

Groups external environmental factors, power/signal integrity issues, and timing/logic vulnerabilities into distinct paragraphs.

Moves the transient fault mechanism figure to be positioned after the external environmental factors paragraph to reinforce the concepts.

Special thanks to @formlsysbookissue for the feedback, so adding to co-author list to credit for help.

Co-authored-by: formlsysbookissue <223422994+formlsysbookissue@users.noreply.github.com>
2025-08-25 22:00:39 +02:00
Vijay Janapa Reddi
3726f0f75e Merge pull request #951 from harvard-edge/fix/issue-946-memory-alloc-section-merge
fix: merge overlapping memory allocation subsections and improve table readability
2025-08-25 21:21:57 +02:00
Vijay Janapa Reddi
de2b6ceae9 Refines memory allocation discussion.
Improves the section on memory allocation for AI acceleration by providing a clearer definition, highlighting workload-specific challenges, and adding a reference to systolic arrays to illustrate the importance of efficient memory access patterns. These changes aim to enhance the reader's understanding of the critical role memory allocation plays in optimizing AI accelerator performance.
2025-08-25 21:19:48 +02:00
Vijay Janapa Reddi
f10851b3e9 Updates benchmarking bibliography entries
Corrects and standardizes several entries in the benchmarking bibliography file.

This includes:

- Updating title casing for consistency.
- Adding missing 'source' and 'date' fields where applicable.
- Using short names for publisher.
- Standardizing author name formats.
- Adding archive details where applicable.
2025-08-24 22:17:49 +02:00
Vijay Janapa Reddi
49dd1cd34a Expands discussion of energy efficiency in ML
Elaborates on the tradeoff between performance and energy
efficiency in machine learning systems.

Highlights the importance of considering energy constraints,
especially in edge devices and mobile applications, and
references research on quantization techniques.
2025-08-24 22:15:20 +02:00
Vijay Janapa Reddi
9f6d3875fc fix(benchmarking): address section 12.8.2 reader critique on performance vs energy efficiency
- Add proper citations for processor frequency scaling claims using Koomey et al. 2011
- Fix unreferenced INT8 quantization claims with Jacob et al. CVPR 2018 citation
- Add Esser et al. 2019 reference for advanced quantization techniques
- Improve section flow with better contextual introductions and transitions
- Consolidate redundant quantization discussion into coherent narrative
- Connect performance-energy tradeoffs to physical limitations and benchmarking standards
- Reorganize bibliography entries alphabetically for better maintainability

Resolves concerns about unreferenced claims, abrupt transitions, and lack of context.
2025-08-24 21:59:26 +02:00
Vijay Janapa Reddi
16871b0cdd fix(benchmarking): address reader critique on power measurement claims
- Replace unsupported 60% claim with precise 57.3% figure from Boroumand et al. ASPLOS 2018
- Add proper citation for DVFS power reduction claims using Kim et al. HPCA 2008
- Improve DVFS integration by connecting to shared infrastructure discussion
- Link DVFS back to cooling systems showing cascading effects
- Add both new references to bibliography with complete metadata

Resolves concerns about unreferenced claims and abrupt topic transitions.
2025-08-24 21:38:59 +02:00
Vijay Janapa Reddi
12e8697b50 fix: add citation for power consumption claim and introduce DVFS properly
Thanks to @formlsysbookissue for reporting this issue.

- Added citation [@barroso2022datacenter] to support the claim that memory-bound inference tasks can consume up to 60% of total system power on data movement
- Introduced Dynamic Voltage and Frequency Scaling (DVFS) with proper explanation before its first mention
- Added smooth transition explaining DVFS as a power management technique that adjusts processor voltage and clock frequency based on workload demands
- Maintained academic tone and technical accuracy while improving content flow

Addresses #944
2025-08-23 23:32:15 +02:00
Vijay Janapa Reddi
0faf6aade2 fix: expand transient fault causes section to match characteristics subsection
Thanks to @formlsysbookissue for reporting this issue.

- Added comprehensive coverage of all transient fault causes mentioned in characteristics subsection
- Organized causes into logical categories: External Environmental Factors, Power and Signal Integrity Issues, and Timing and Logic Vulnerabilities
- Included detailed explanations for voltage fluctuations, ESD, ground bounce, crosstalk, timing violations, and soft errors in combinational logic
- Maintained existing citations and added proper academic structure
- Ensured consistency between characteristics and causes subsections

Addresses #945
2025-08-23 23:30:46 +02:00
Vijay Janapa Reddi
39a35a448c fix: merge overlapping memory allocation subsections and improve table readability
Thanks to @formlsysbookissue for reporting this issue.

- Merged three overlapping subsections (Definition, Importance, Effective) into single cohesive 'Fundamentals and Challenges' subsection
- Added authoritative citations for memory allocation challenges in different architectures (GPUs, TPUs, wafer-scale processors)
- Improved table formatting with bold headers for better visual clarity and readability
- Eliminated redundant explanations while preserving all technical content
- Enhanced pedagogical flow by consolidating related concepts

Addresses #946
2025-08-23 23:26:54 +02:00
Vijay Janapa Reddi
96aaab1880 Merge pull request #950 from harvard-edge/fix/issue-947-dendrite-synapse-correction
fix: Correct biological neuron mapping and add optical interconnects context
2025-08-23 16:29:58 -04:00
Vijay Janapa Reddi
f3eafb01f4 feat: Add optical interconnects context to sustainability chapter
Thanks to @formlsysbookissue for highlighting the importance of optical
interconnects in modern AI infrastructure.

- Added discussion of optical interconnects in resource challenges context
- Included concrete examples (TPUv4, Mellanox technologies)
- Added proper citation to Jouppi et al. 2023 TPU paper
- Connected optical technology adoption to germanium supply concerns
- Added explanatory footnote about Mellanox

This addition helps readers understand how emerging interconnect technologies
both address bandwidth limitations and create new material dependencies.

Part of #947
2025-08-23 22:26:23 +02:00
Vijay Janapa Reddi
79e73a530c fix: Correct biological neuron to artificial neuron mapping
Thanks to @formlsysbookissue for identifying this important clarification.

- Updated Table 3.1: Dendrites now map to inputs, synapses to weights
- Revised explanatory text throughout Chapter 3 to maintain distinction
- Updated quiz question to reflect corrected understanding
- Renumbered mapping list for clarity (1-5 instead of 1-4)

This correction helps students build accurate mental models of how biological
neural structures relate to artificial neural networks.

Part of #947
2025-08-23 22:24:52 +02:00
Tauno Erik
fc0ebf7be7 Added missing loop() 2025-08-23 19:35:02 +03:00
Vijay Janapa Reddi
7b384f9bbc fix(redirects): synchronize netlify and quarto redirect files
Corrected a typo in the EPUB path in 'quarto/_redirects' and added missing redirect rules to both 'quarto/_redirects' and 'netlify.toml'.

This ensures that the redirect behavior is consistent across both Netlify and direct GitHub Pages access, resolving discrepancies and improving robustness.
2025-08-22 07:33:37 -04:00
Vijay Janapa Reddi
1a6dfdb528 refactor: move publish scripts to quarto/publish/ for better architecture
Move compression scripts from tools/scripts/publish/ to quarto/publish/:
- compress_epub.py → quarto/publish/compress_epub.py
- compress_pdf.py → quarto/publish/compress_pdf.py

Rationale:
- Publishing scripts are part of Quarto workflow, not general tooling
- quarto/ directory is mounted in containers, tools/ is not
- Cleaner separation: tools/ = environment, quarto/publish/ = content packaging
- Fixes container path issues where tools/scripts/publish/ was not available

Updated all workflow references to use new paths.
This should resolve the 'No such file or directory' errors in containers.
2025-08-21 21:25:09 -04:00
Vijay Janapa Reddi
0cc3857fbf Remove .bak files 2025-08-21 14:01:55 -04:00
Vijay Janapa Reddi
167e9fc4ab refactor(config): remove obsolete quarto netlify.toml
- Remove quarto/netlify.toml (not used in current deployment)
- Current architecture: mlsysbook.ai → Netlify proxy → GitHub Pages
- Root netlify.toml handles proxy configuration with all features
- Quarto version was outdated (wrong PDF path, missing EPUB redirect)

This eliminates confusion about deployment configuration and maintains
single source of truth in root netlify.toml for proxy setup.
2025-08-19 12:31:55 -04:00
Vijay Janapa Reddi
6be1d4f2c4 Removes redundant Roboflow dataset link
The Roboflow dataset link was duplicated, with an embedded image
that wasn't rendering correctly. This change removes the redundant
link, leaving only the primary hyperlink.
2025-08-19 08:22:37 -04:00
Vijay Janapa Reddi
bfdec0a71e refactor(scripts): remove deprecated bash SVG cleaner
- Remove clean-svgs.sh as it has been fully replaced by clean_svgs.py
- All Quarto configurations now use the cross-platform Python version
- Eliminates dead code and prevents confusion about which script to use
2025-08-19 08:12:35 -04:00
Vijay Janapa Reddi
fd5fb20255 feat(scripts): add cross-platform Python SVG cleaner
- Add clean_svgs.py as cross-platform replacement for clean-svgs.sh
- Resolves Windows container compatibility issue (os error 193)
- Update all Quarto configs to use Python script
- Maintain all original functionality with improved error handling
- Add comprehensive logging and debug mode
- Use pathlib for cross-platform path operations
- Mark original bash script as deprecated

Fixes Windows build error: '%1 is not a valid Win32 application'
2025-08-19 08:10:29 -04:00
Vijay Janapa Reddi
984f08c0e2 Fixes image path in CI/CD pipeline figure
Updates the image path for the CI/CD pipeline figure to correct a broken link.
2025-08-19 07:04:03 -04:00
Vijay Janapa Reddi
23bbde7186 feat(routing): add EPUB download redirects and headers
- Add /epub redirect to assets/Machine-Learning-Systems.epub in netlify.toml
- Add /epub redirect to _redirects file for GitHub Pages fallback
- Configure proper MIME type (application/epub+zip) for EPUB files
- Set appropriate caching headers for EPUB downloads
- Maintain consistency with existing PDF redirect patterns
2025-08-17 14:26:16 -04:00
Vijay Janapa Reddi
51912ae491 feat(html): add EPUB download button to navbar
- Replace single PDF button with separate PDF and EPUB buttons
- Use file-pdf icon for PDF and book icon for EPUB
- Provide direct one-click access to both download formats
- Maintain existing PDF functionality while adding EPUB support
2025-08-17 14:26:10 -04:00
Vijay Janapa Reddi
4d55772a02 feat(epub): improve code block spacing and center tables
- Reduce code block margins from 2rem to 1rem for .listing elements
- Reduce code block padding from 0.75rem to 0.5rem for better compactness
- Reduce pre block margins from 1.5em to 1em and padding from 1em to 0.75em
- Center tables using margin: auto for better visual presentation
- Add specific centering rule for tables within figures
2025-08-17 11:58:30 -04:00
Vijay Janapa Reddi
7ed4324c21 Adds cover image for title.
Adds a new cover image for the title, enhancing the visual appeal.
2025-08-16 18:01:35 -04:00
Vijay Janapa Reddi
827f2b882a Enables all content parts in epub config
Uncomments all parts and chapters in the epub configuration file.
This makes the full book content available in the epub output.
2025-08-16 18:01:30 -04:00
Vijay Janapa Reddi
72e771e45d Adds spacing to support section
Increases readability of the "Ways to Support" section
by adding whitespace before the list.
2025-08-16 17:55:38 -04:00
Vijay Janapa Reddi
3a76ffbf7d Adds whitespace for readability
Inserts a blank line before the list of book details to improve readability of the introductory text on the index page.
2025-08-16 17:55:30 -04:00
Vijay Janapa Reddi
6e221dbd38 Enables hover effects and link citations in EPUB.
Updates the EPUB configuration to enable hover effects for footnotes and citations, enhancing user interaction.

Also enables linking of citations to their corresponding references for improved navigation within the document.
2025-08-16 17:54:35 -04:00
Vijay Janapa Reddi
d745765da7 fix(epub): configure footnotes to display at document bottom
- Set footnotes-hover to false to disable click-to-reveal behavior
- Set reference-location to document to show footnotes at bottom of sections
- Disable link-external-newwindow for better EPUB compatibility
- Ensures footnotes are visible by default rather than hidden behind clicks
2025-08-16 16:03:29 -04:00
Vijay Janapa Reddi
735f0a6a5f feat(epub): enhance footnote styling and typography
- Add comprehensive footnote styling with Harvard Crimson theme colors
- Style footnote reference links with hover effects and proper superscript
- Improve footnote content typography with better spacing and readability
- Add visual separator line above footnotes section
- Style footnote numbers with crimson color and proper weight
- Enhance back-reference links with subtle hover effects
- Add special styling for code within footnotes
- Ensure footnotes are properly formatted and visually distinct
2025-08-16 16:01:54 -04:00
Vijay Janapa Reddi
c427d8f569 fix(epub): improve image display and caption alignment
- Remove box-shadow and border-radius from images to eliminate unwanted backgrounds
- Set explicit transparent background for images and figures
- Remove duplicate image styling blocks for cleaner CSS
- Change figcaption alignment from center to left for better readability
- Add border and outline none to prevent inherited styling issues
- Consolidate image styling into single Enhanced Figure section
2025-08-16 15:55:03 -04:00
Vijay Janapa Reddi
be95a64a1f Removes unnecessary repo-branch setting
Removes the `repo-branch` setting from the quarto config files.
This setting is no longer needed and simplifies the configuration.
2025-08-16 15:39:43 -04:00
Vijay Janapa Reddi
ddf61e821c Updates changelog visibility by format
Refines the visibility of the changelog based on the output format.

The full changelog is now displayed only in HTML format with Javascript enabled.
For PDF and EPUB formats, a link to the online changelog is provided instead.
2025-08-16 15:39:09 -04:00
Vijay Janapa Reddi
be2e0c7030 Updates SocratiQ visibility conditions
Adjusts the visibility conditions for SocratiQ content.

Now includes `epub` format alongside `pdf` for visible content,
and specifies `html:js` to ensure SocratiQ functionality is enabled
only when JavaScript is active in the HTML output. This ensures
SocratiQ is only active in the online version.
2025-08-16 15:38:32 -04:00
Vijay Janapa Reddi
8a1c716280 feat(index): add multi-format support for abstract and book info
- Add html:js conditional blocks for interactive HTML content
- Add pdf,epub conditional blocks for static content alternatives
- Consolidate duplicate content blocks for better maintainability
- Ensure EPUB compatibility by removing JavaScript dependencies
2025-08-16 14:56:14 -04:00
Vijay Janapa Reddi
e43610970a Merge branch 'dev' into feature/epub-development 2025-08-16 14:45:58 -04:00
Vijay Janapa Reddi
4e54875c3c refactor(styles): move inline styles from index.qmd to style.scss
- Move abstract section styles to centralized SCSS file
- Move book card styles including hover effects and responsive design
- Move blockquote styles for consistent theming
- Remove inline style blocks from index.qmd for better separation of concerns
- Maintain existing functionality while improving code organization
2025-08-16 14:45:03 -04:00
Vijay Janapa Reddi
fc28fd9ca0 feat(epub): align CSS styles with Harvard Crimson website theme
- Add comprehensive CSS variables for Harvard Crimson color scheme
- Update typography to match website font stack (system fonts)
- Enhance heading styles with crimson left/bottom borders
- Implement syntax highlighting colors matching website code theme
- Improve table styling with crimson accents and zebra striping
- Add callout system styling consistent with website design
- Enhance code blocks with modern monospace fonts and better spacing
- Improve figure, image, and blockquote styling
- Add ePub-specific optimizations for better text rendering
- Ensure consistent brand experience across all textbook formats
2025-08-16 13:56:24 -04:00
Vijay Janapa Reddi
e6c045aba0 Merge branch 'dev' into feature/epub-development 2025-08-16 13:40:21 -04:00
Vijay Janapa Reddi
3734b449f1 Refines data governance figure for clarity
Enhances the data governance diagram by improving readability and information display.

This includes adjusting fonts, modifying node styles, and refining labels for better visual representation and comprehension of the data governance pillars.
2025-08-16 09:02:02 -04:00