Skip to content
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

[MRG] Add fine-tune CV model API #193

Merged
merged 6 commits into from
Jan 30, 2021
Merged

Conversation

YuanmingLeee
Copy link
Contributor

@YuanmingLeee YuanmingLeee commented Jan 28, 2021

What has been done to verify that this works as intended?

First, make sure you have installed the correct experimental environment according to CONTRIBUTE.md. You have also installed the modelci pip package, to enable the CLI tools. You have also started the ModelCI service by:

source scripts/setup_env.sh
modelci start

Then register a ResNet50, PyTorch model into the ModelDB.

modelci model export -n ResNet50 -f PyTorch

Next, start the frontend. (Kill it first if you have started it before)

python -m uvicorn modelci.app.main:app --host 0.0.0.0 --reload

Now, go the the 0.0.0.0:8000/docs, try the API

[PATCH] ​/api​/exp​/cv-tuner​/finetune​/{id}​

ClickTry it out, find the model ID of the PyTorch model*, and click execute as follows:
image

Why is this the best possible solution? Were any other approaches considered?

To be discussed.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

A new feature, no breaking changes to the existing system.

Does this change require updates to documentation?

Yes.

Before submitting this PR, please make sure you have:

  • run python -m pytest tests/ and confirmed all checks still pass.
  • verified that any code or assets from external sources are properly credited.

* Change auto layer typing hint
* Add example for `Structure` fields
* Remove uncleared private attribute
* Add parse from pytorch nn module function
* Simplify type hint for `ModelLayer`
@YuanmingLeee YuanmingLeee linked an issue Jan 28, 2021 that may be closed by this pull request
@YuanmingLeee YuanmingLeee added this to In progress in v1.1 via automation Jan 28, 2021
@YuanmingLeee YuanmingLeee added discussion enhancement New feature or request labels Jan 28, 2021
univerone
univerone previously approved these changes Jan 29, 2021
Copy link
Collaborator

@univerone univerone left a comment

Choose a reason for hiding this comment

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

LGTM! This is a breakthrough new feature!

modelci/app/v1/endpoints/model.py Outdated Show resolved Hide resolved
modelci/app/v1/endpoints/model.py Outdated Show resolved Hide resolved
modelci/app/v1/endpoints/model.py Show resolved Hide resolved
modelci/app/v1/endpoints/model.py Show resolved Hide resolved
modelci/app/v1/endpoints/model.py Show resolved Hide resolved
modelci/app/v1/endpoints/model.py Outdated Show resolved Hide resolved
modelci/hub/manager.py Show resolved Hide resolved
modelci/types/vo/model_structure_vo.py Outdated Show resolved Hide resolved
* Update requirement packages to fix torchvision version
* Change name: model_structure_vo.py -> model_structure.py
* Add todo to simplify `modelci.hub.manager.register_model` logic
@YuanmingLeee YuanmingLeee changed the title [WIP] Add fine-tune model structure API [MRG] Add fine-tune CV model API Jan 30, 2021
@HuaizhengZhang
Copy link
Contributor

lgtm. You can creat a exp/ dir and put some code into it to speed up your progress. We will not review code in it.

@YuanmingLeee YuanmingLeee merged commit 5801260 into cap-ntu:master Jan 30, 2021
v1.1 automation moved this from In progress to Done Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
v1.1
Done
Development

Successfully merging this pull request may close these issues.

[Feat] Model Structure Update API
3 participants