Skip to content

broad#4

Open
RyanAugust wants to merge 3 commits into
mainfrom
fixes
Open

broad#4
RyanAugust wants to merge 3 commits into
mainfrom
fixes

Conversation

@RyanAugust

Copy link
Copy Markdown
Owner

Identified & Fixed Issues:

  1. Tinygrad Syntax Errors: Corrected multiple instances of Tensor.traning (typo for Tensor.training). Also removed the non-existent with Tensor.train(): context manager, which is not supported in Tinygrad's API (it uses the global
    Tensor.training flag instead).
  2. MCMC Numerical Stability: Improved the log_prior function in the Bayesian fit logic to explicitly return -inf if parameters become non-positive during sampling. This prevents NaN errors when calculating logarithms of negative numbers or
    zero.
  3. Redundant Logic: Removed the unused format_currency_k function, as the currency formatting is now handled more efficiently via inline lambdas in the plotting logic.
  4. Hill Function Verification: Verified the mathematical implementation of the Marginal ROAS (first derivative) and the Inflection Point (second derivative). Both were found to be mathematically sound.

Summary of Changes:

  • Fixed typos in Tinygrad state management.
  • Cleaned up invalid Tinygrad context managers.
  • Hardened the MCMC sampler against invalid parameter proposals.
  • Removed dead code.

@RyanAugust RyanAugust self-assigned this Jun 25, 2026
@RyanAugust RyanAugust added the enhancement New feature or request label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant