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

fix #6949 #6951

Merged
merged 2 commits into from
Jan 10, 2024
Merged

fix #6949 #6951

merged 2 commits into from
Jan 10, 2024

Conversation

LittleLittleCloud
Copy link
Contributor

We are excited to review your PR.

So we can do the best job, please check:

  • There's a descriptive title that will make sense to other developers some time from now.
  • There's associated issues. All PR's should have issue(s) associated - unless a trivial self-evident change such as fixing a typo. You can use the format Fixes #nnnn in your description to cause GitHub to automatically close the issue(s) when your PR is merged.
  • Your change description explains what the change does, why you chose your approach, and anything else that reviewers should know.
  • You have included any necessary tests in the same PR.

Fix #6949

@ericstj
Copy link
Member

ericstj commented Jan 10, 2024

Interesting, the addition of SearchSpace sub-namespace now causes a type name resolution problem:

.Select(j => SearchSpace.ArchHiddenSize[DiscreteArches[j]]).ToArray();
var nextHiddenSize = SearchSpace.CheckHiddenDimensionsAndReturnMax(hiddenSizesPerBlock);
if (nextHiddenSize == 0)
{
if (hiddenSizePerBlock.Count == 0)
{
nextHiddenSize = SearchSpace.ArchHiddenSize[^1];

Looks like those were meant to refer to this internal class:

Maybe we just rename that @michaelgsharp?

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 33 lines in your changes are missing coverage. Please review.

Comparison is base (d0d8569) 68.80% compared to head (64a8a73) 68.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6951      +/-   ##
==========================================
- Coverage   68.80%   68.80%   -0.01%     
==========================================
  Files        1249     1249              
  Lines      249644   249686      +42     
  Branches    25481    25485       +4     
==========================================
+ Hits       171778   171797      +19     
- Misses      71275    71294      +19     
- Partials     6591     6595       +4     
Flag Coverage Δ
Debug 68.80% <67.96%> (-0.01%) ⬇️
production 63.27% <67.96%> (-0.01%) ⬇️
test 88.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...oft.ML.Core/SearchSpace/BoolearnChoiceAttribute.cs 100.00% <100.00%> (ø)
...c/Microsoft.ML.Core/SearchSpace/ChoiceAttribute.cs 100.00% <100.00%> (ø)
...crosoft.ML.Core/SearchSpace/NestOptionAttribute.cs 100.00% <100.00%> (ø)
...oft.ML.TorchSharp/NasBert/Models/NasBertEncoder.cs 69.81% <66.66%> (ø)
src/Microsoft.ML.SearchSpace/SearchSpace.cs 82.18% <56.00%> (-2.97%) ⬇️
...rc/Microsoft.ML.Core/SearchSpace/RangeAttribute.cs 54.34% <54.34%> (ø)

... and 1 file with indirect coverage changes

@michaelgsharp
Copy link
Member

@ericstj any classes directly involved in the TorchSharp model itself need to match names exactly with the name that was used to save the weights file. We could try and rename this file and see if things still load, but if its at all saved in the weights file its not a class that we can rename. I'll test that out and add a comment here about it.

Copy link
Member

@michaelgsharp michaelgsharp left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@michaelgsharp michaelgsharp merged commit ac6d130 into dotnet:main Jan 10, 2024
25 checks passed
@michaelgsharp
Copy link
Member

/backport to release/3.0

Copy link

Started backporting to release/3.0: https://github.com/dotnet/machinelearning/actions/runs/7481061541

@ericstj
Copy link
Member

ericstj commented Jan 11, 2024

any classes directly involved in the TorchSharp model itself need to match names exactly with the name that was used to save the weights file.

How would we be persisting the name of this static class in our saved file? Still might be worth renaming since we try to avoid name collisions in our codebases.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants