Skip to content

Creating both environment and context is annoying #1045

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

Closed
Zruty0 opened this issue Sep 26, 2018 · 1 comment
Closed

Creating both environment and context is annoying #1045

Zruty0 opened this issue Sep 26, 2018 · 1 comment
Assignees
Labels
API Issues pertaining the friendly API

Comments

@Zruty0
Copy link
Contributor

Zruty0 commented Sep 26, 2018

This is what I have to write in the docs all the time:

// Create a new environment for ML.NET operations. It can be used for exception tracking and logging, 
// as well as the source of randomness.
var env = new LocalEnvironment();

// We know that this is a classification task, so we create a multiclass classification context: it will give us the algorithms
// we need, as well as the evaluation procedure.
var classification = new MulticlassClassificationContext(env);

Can we make context create the environment if they aren't provided one? And also expose it as a property?

/cc @TomFinley

@shauheen shauheen added the API Issues pertaining the friendly API label Sep 26, 2018
@shauheen
Copy link
Contributor

shauheen commented Oct 5, 2018

Duplicate of #1098

@shauheen shauheen marked this as a duplicate of #1098 Oct 5, 2018
@shauheen shauheen closed this as completed Oct 5, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Issues pertaining the friendly API
Projects
None yet
Development

No branches or pull requests

2 participants