-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LocalEnvironment to stop being IDisposable #1287
Comments
The implication is that anything that relies on it for temporary file creation and that requires must cease to do so. In order for us to do this, we must also remove temporary file creation from machinelearning/src/Microsoft.ML.Data/EntryPoints/Cache.cs Lines 71 to 73 in 057c4b9
That's bad, but I think there's a pretty easily solution. I think it is completely reasonable for someone asking for disk cache to provide a place where on the disk it should be stored. I think that will actually be an improvement -- certainly it is not an expectation that any "temporary" files will be many gigabytes or terabytes large (which is the only conceivable reason why anyone would use disk caching in the first place), so having some ability to configure where it is stored would I think be good. Or we provide access to the binary saver via entry-points and say that if someone wants that functionality they just have to do it themselves. This I think is fine, since entry-points were entry-points into ML.NET for wrapping code, not user facing code. |
@TomFinley is this still relevant? IHostEnvironment is no longer disposable AFAIK. |
Yes, this is still relevant. We still have these methods on machinelearning/src/Microsoft.ML.Core/Data/IHostEnvironment.cs Lines 55 to 77 in 0c62e30
Even though it doesn't implement |
Just an FYI - it looks like the only place in the product that is calling machinelearning/src/Microsoft.ML.Data/EntryPoints/InputBase.cs Lines 220 to 224 in 174de1a
This is good, because it means you can't get to this code from public APIs. And we can force the EntryPoints to call |
* Remove CreateTempFile Fixes: #1287
The only reason we have
IHostEnvironment
as anIDisposable
is because we clean up the temp files created usingCreateTempFile
. This functionality is not really very useful. We should remove the functionality, remove theIDisposable
and fix all theusing
calls in the codebase (preferably to justnew MLContext
, if possible)The text was updated successfully, but these errors were encountered: