Skip to content

Add Widgets Support for MindSpore - #673

Merged
xianbaoqian merged 1 commit into
huggingface:mainfrom
hellowaywewe:dev
Feb 14, 2023
Merged

Add Widgets Support for MindSpore#673
xianbaoqian merged 1 commit into
huggingface:mainfrom
hellowaywewe:dev

Conversation

@hellowaywewe

Copy link
Copy Markdown
Contributor

No description provided.

repoUrl: "https://github.com/fastai/fastai",
snippet: fastai,
},
"mindspore": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that mindspore is the name of the framework, and tinyms is the name of the library.

Is all MindSpore model using tinyms, if so we can mix the two. Or do you have other libraries on top of MindSpore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xianbaoqian Thank you for your review. Yes, you are right, the mindspore is the name of the framework, and tinyms is the name of the library. All the MindSpore models can use tinyms, MindSopore's easy-to-use suite library, to adapt to HF to provide more AI experience services for users.
I don't know what the repoUrl field in the Libraries.ts file is for, so I fill in tinyms to help the background download directly to tinyms to execute the task. If this field has no special technical purpose, It can be filled with the MindSpore framework name, I have updated, thank you.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks. I think it looks good now.

Curious how do tinyms tells which the task of the model? Thx

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TinyMS determines what tasks need to be done based on the network and the data set. For example, LeNet networks and mnist datasets perform the image-classification task. I don't know if I've answered your question.

@xianbaoqian
xianbaoqian merged commit d4ed97a into huggingface:main Feb 14, 2023

@osanseviero osanseviero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool PR! Sorry for the late review, I just have a small nit


const mindspore = (model: ModelData) => {
const architecture = model.config.architectures[0].toLowerCase();
if (model.tags?.includes("image-classification")){

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case it's not an image classification model, we should have some fallback/unknown snippet (e.g. https://github.com/hellowaywewe/hub-docs/blob/main/js/src/lib/interfaces/Libraries.ts#L82). Just to confirm, the given snippet does not work unless it's a image-classification model?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@osanseviero Yes, you are right, currently we provide image-classification only as a test, but more tasks will be supported later. I have submitted a new PR, please review it. (#673)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this PR (#677)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants