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

chore: Remove MVAD's dependence on hardwired credentials and azure SDKs #1629

Merged
merged 1 commit into from Aug 24, 2022

Conversation

mhamilton723
Copy link
Collaborator

@mhamilton723 mhamilton723 commented Aug 24, 2022

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

Briefly describe the changes included in this Pull Request.

How is this patch tested?

  • I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

  • No. You can skip this section.
  • Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

  • No. You can skip this section.
  • Yes. Make sure you have added samples following below steps.
  1. Find the corresponding markdown file for your new feature in website/docs/documentation folder.
    Make sure you choose the correct class estimators/transformers and namespace.
  2. Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
  3. Make sure the DocTable points to correct API link.
  4. Navigate to website folder, and run yarn run start to make sure the website renders correctly.
  5. Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
  6. Make sure the WebsiteSamplesTests job pass in the pipeline.

AB#1944709

@github-actions
Copy link

Hey @mhamilton723 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.
We appreciate your patience and contributions 💯!

@mhamilton723
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2022

Codecov Report

Merging #1629 (d5ee8e7) into master (d5ee8e7) will not change coverage.
The diff coverage is n/a.

❗ Current head d5ee8e7 differs from pull request most recent head 58ca0e1. Consider uploading reports for the commit 58ca0e1 to get more accurate results

@@           Coverage Diff           @@
##           master    #1629   +/-   ##
=======================================
  Coverage   82.81%   82.81%           
=======================================
  Files         286      286           
  Lines       15064    15064           
  Branches      745      745           
=======================================
  Hits        12476    12476           
  Misses       2588     2588           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mhamilton723
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@serena-ruan serena-ruan left a comment

Choose a reason for hiding this comment

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

Thanks for all those crazy refactor!! It's super clean now and easier to maintain in the future 😄 Hooray!

val intermediateSaveDir = new Param[String](this, "intermediateSaveDir", "Directory name " +
"of which you want to save the intermediate data produced while training.")
private def validateIntermediateSaveDir(dir: String): Boolean = {
assert(dir.startsWith("wasbs://"), "improper HDFS loacation. Please use a wasb path such as: \n" +
Copy link
Contributor

Choose a reason for hiding this comment

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

Is only wasbs accepted? What about abfss and say in Trident some other protocols?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added abfss too

private def getStorageInfo: StorageInfo = {
val uri = new URI(getIntermediateSaveDir)
val account = uri.getHost.split(".".toCharArray).head
val config = s"fs.azure.account.key.$account.blob.core.windows.net"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this config also work on databricks?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes!

val errors = summary.errors.get.toJson.compactPrint
throw new RuntimeException(s"Caught errors during inference: $errors")
throw new RuntimeException(s"Could not get trained model: $errors")
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not can't get trained model error I guess, it should be inference failure?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@@ -397,6 +348,19 @@ trait MADBase extends HasOutputCol
|""".stripMargin
}

protected def submitDataset(dataset: Dataset[_]): Map[String, JsValue] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we rename this method as it does both submitDataset and send request to MVAD?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@mhamilton723
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mhamilton723 mhamilton723 merged commit e700fd1 into microsoft:master Aug 24, 2022
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.

None yet

3 participants