发布

  • [OPIK-2406] [SDK] [P SDK] Make RandomSampler use standard library random module instead of numpy (#3282)

    frostbyte_neo 发布于 2025-09-17 10:15:04 +00:00

    • [OPIK-2406] [SDK] Make RandomSampler use standard library random module instead of numpy
    • Replace numpy.random.default_rng() with random.Random()
    • Replace generator.choice() with random.sample() and random.shuffle()
    • Remove numpy import and error handling from RandomDatasetSampler
    • Maintain same API and behavior for backward compatibility
    • All existing tests pass with new implementation
    • Numpy still available for external data serialization in jsonable_encoder
    • [OPIK-2406] Fixed auto-generated by Cursor code to avoid unnecessary performance overhead.
    下载附件