Skip to content

Conversation

@chensuyue
Copy link
Contributor

@chensuyue chensuyue commented Dec 7, 2025

User description

update flux scripts


PR Type

Enhancement


Description

  • Added default dataset location parameter

  • Updated dataset usage in run_tuning function


Diagram Walkthrough

flowchart LR
  A["Update run_tuning function"] -- "Add default dataset location" --> B["Use dataset_location variable"]
Loading

File Walkthrough

Relevant files
Enhancement
run_quant.sh
Add default dataset location in run_tuning                             

examples/pytorch/diffusion_model/diffusers/flux/run_quant.sh

  • Added default value for dataset_location
  • Updated extra_cmd to use dataset_location variable
+3/-2     

Signed-off-by: chensuyue <suyue.chen@intel.com>
@PRAgent4INC
Copy link
Collaborator

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Default Value

The default value for dataset_location is set to "captions_source.tsv". Ensure this is the correct default value and that it exists in the expected directory.

dataset_location=${dataset_location:="captions_source.tsv"}
Hardcoded Dataset

The dataset is hardcoded in the extra_cmd variable. Consider making this configurable via a script argument or environment variable.

}

@PRAgent4INC
Copy link
Collaborator

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Validate dataset_location

Ensure dataset_location is properly set before usage to avoid unexpected behavior.

examples/pytorch/diffusion_model/diffusers/flux/run_quant.sh [39-46]

 dataset_location=${dataset_location:="captions_source.tsv"}
 ...
-extra_cmd="--scheme FP8 --iters 0 --dataset captions_source.tsv --quantize"
+extra_cmd="--scheme FP8 --iters 0 --dataset ${dataset_location} --quantize"
 ...
-extra_cmd="--scheme MXFP8 --iters 1000 --dataset captions_source.tsv --quantize"
+extra_cmd="--scheme MXFP8 --iters 1000 --dataset ${dataset_location} --quantize"
Suggestion importance[1-10]: 5

__

Why: The suggestion asks to ensure dataset_location is properly set, which is a good practice. However, the improved_code is identical to the existing_code, so it offers only a minor improvement.

Low

@chensuyue chensuyue merged commit 8564f48 into master Dec 7, 2025
15 checks passed
@chensuyue chensuyue deleted the fix-flux-scripts branch December 7, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants