Skip to content

Final interface of Schema #1500

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 Nov 1, 2018 · 3 comments
Closed

Final interface of Schema #1500

Zruty0 opened this issue Nov 1, 2018 · 3 comments
Assignees
Labels
API Issues pertaining the friendly API

Comments

@Zruty0
Copy link
Contributor

Zruty0 commented Nov 1, 2018

As we have agreed on the API reviews, we will make the following modifications to Schema:

  • Make it an ICollection<Schema.Column>
  • Expand Column class to contain 2 fields: IsHidden and Index.
  • Remove all methods except those exposed by collections, this accessors and GetColumnOrNull.
  • Make constructors internal. Create a SchemaBuilder (in a different namespace Microsoft.ML.Schema) that would be responsible to building the schema.
    • This is to make it more obvious that columns are NOT reused by different schemas.
  • Move Schema.Metadata.Builder into a separate class MetadataBuilder in namespace Microsoft.ML.Schema.
  • Finally, probably rename to DataSchema
@Zruty0 Zruty0 mentioned this issue Nov 1, 2018
@TomFinley
Copy link
Contributor

TomFinley commented Nov 5, 2018

Hi @Zruty0 thanks for writing this. Pursuant to API review notes, let us consider the following refinements:

  • this Column structure should probably be a struct.
  • the enumerator over the columns should itself be a struct enumerator.
  • you mentioned ICollection, but this interface contains methods for mutating (e.g., Add), so I think you meant something else. This should probably be refined here, since your intention was that Schema be immutable.
  • Removal of value-tuple as an exchange type on this object, since this does not play very nicely with F#.

@sfilipi
Copy link
Member

sfilipi commented Jan 15, 2019

The only part that remains in this, is cleaning up usages of TryGetColumnIndex; which is not user-facing anymore; and renaming Schema to DataSchema.

@glebuk glebuk added the API Issues pertaining the friendly API label Jan 18, 2019
sfilipi added a commit to sfilipi/machinelearning-1 that referenced this issue Feb 5, 2019
@sfilipi
Copy link
Member

sfilipi commented Feb 5, 2019

All the work for this is done.
The only thing left atm, the renaming, is covered in #2297.

@sfilipi sfilipi closed this as completed Feb 5, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Mar 27, 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

4 participants