Skip to content

Release dataset after training and optimization#1075

Merged
zhenghaoz merged 2 commits into
masterfrom
mem
Oct 16, 2025
Merged

Release dataset after training and optimization#1075
zhenghaoz merged 2 commits into
masterfrom
mem

Conversation

@zhenghaoz

Copy link
Copy Markdown
Collaborator

No description provided.

@zhenghaoz
zhenghaoz requested a review from Copilot October 16, 2025 12:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors dataset management to release datasets after training and optimization. The primary goal is to improve memory management by restructuring how datasets are stored and accessed within the Master struct.

  • Moved dataset fields from Master struct to a new Datasets struct that's returned from loadDataset()
  • Modified the loadDataset() function to return a Datasets struct instead of individual dataset pointers
  • Removed dataset storage fields and related mutexes from the Master struct

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
master/master.go Introduces new Datasets struct and removes dataset storage fields from Master struct
master/tasks.go Refactors loadDataset() to return Datasets struct and updates all dataset references
master/tasks_test.go Updates test cases to work with new dataset structure and removes assignments to removed struct fields

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread master/tasks.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@zhenghaoz
zhenghaoz merged commit 89f2c72 into master Oct 16, 2025
11 checks passed
@zhenghaoz
zhenghaoz deleted the mem branch October 16, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants