Skip to content

floor block length#117

Merged
micahwoodard merged 4 commits into
mainfrom
fix-block-length
Jun 30, 2026
Merged

floor block length#117
micahwoodard merged 4 commits into
mainfrom
fix-block-length

Conversation

@micahwoodard

@micahwoodard micahwoodard commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Floor block length to match current implementation. Updates curriculum to increase upper bound since max is exclusive. resolves #116

@micahwoodard micahwoodard changed the title rounds block length to nearest whole number floor block length Jun 26, 2026
@micahwoodard

Copy link
Copy Markdown
Collaborator Author

Replicated the current code base rounding pattern

if self.TP_Randomness == "Exponential":
            self.BlockLen = np.array(
                int(
                    np.random.exponential(float(self.TP_BlockBeta))
                    + float(self.TP_BlockMin)
                )
            )
elif self.TP_Randomness == "Even":
            self.BlockLen = np.array(
                np.random.randint(
                    float(self.TP_BlockMin), float(self.TP_BlockMax) + 1
                )
            )

@micahwoodard micahwoodard assigned alexpiet and unassigned alexpiet Jun 26, 2026
@micahwoodard micahwoodard requested a review from alexpiet June 26, 2026 17:27

@bruno-f-cruz bruno-f-cruz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code-wise looks ok to me.

@micahwoodard micahwoodard merged commit e94fd60 into main Jun 30, 2026
4 checks passed
@micahwoodard micahwoodard deleted the fix-block-length branch June 30, 2026 15:43
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.

Block length rounding error

3 participants