Skip to content

Should Random.Utilities be thread safe and more random? #168

Closed
@veikkoeeva

Description

@veikkoeeva

Coming from #166.

  1. The various random number generators are not thread safe. It might make sense to make them such. Are there cases against not making them such?
  2. Should the generators be seeded with cryptographic random seed to make sure they're random when no seed is given?
  3. The MachineLearning.Net has tendency to put many classes in one file (and have them uncommented). Would there be opposition to put the classes into separate files?
  4. The library has also a tendency to put functions not strictly needed for the functionality in the domain classes. Such as saving, like at
    public void Save(BinaryWriter writer)
    . Would there be opposition to provide these as extension methods or in some other fashion? Since it might be one might want to serialize things differently and organizing differently would avoid baking in dependencies. A related idea: IFormatProvider in TextLoader #126 (comment).

At a glance point, there can be other issues too. Would there be opposition to refactor points 1 through 3? Possibly 4?

The source: https://github.com/dotnet/machinelearning/blob/436700aadf615e7f05a22925476cc441c63a919d/src/Microsoft.ML.Core/Utilities/Random.cs

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions