SynapseML Development Setup
- Install JDK 11
- You may need an Oracle login to download.
- Install SBT
- Fork the repository on github
- See how to here: Fork a repo - GitHub Docs
- Clone your fork
git clone https://github.com/<your GitHub handle>/SynapseML.git
- This will automatically add your fork as the default remote, called
- Add another Git Remote to track the original SynapseML repo. It's recommended to call it
git remote add upstream https://github.com/microsoft/SynapseML.git
- See more about Git remotes here: Git - Working with remotes
- Go to the directory where you cloed the repo (e.g.,
- Run sbt to compile and grab datasets
- Install IntelliJ
- Configure IntelliJ
- Install Scala plugin during initialization
- OPEN the synapseml directory from IntelliJ
- If the project does not automatically import,click on
build.sbtand import project
- Prepare your Python Environment
- Install Miniconda
- Note: if you want to run conda commands from IntelliJ, you may need to select the option to add conda to PATH during installation.
- Activate the
synapsemlconda environment by running
conda env create -f environment.ymlfrom the
- Install pre-commit
- This repository uses the pre-commit tool to manage git hooks and enforce linting/coding styles.
- The hooks are configured in .pre-commit-config.yaml.
- To use the hooks, please run the following commands:
pip install pre-commit
pre-commitshould automatically run on every
git commitoperation to find AND fix linting issues.
If you will be regularly contributing to the SynapseML repo, you'll want to keep your fork synced with the upstream repository. Please read this GitHub doc to know more and learn techniques about how to do it.
Publishing and Using Build Secrets
To use secrets in the build you must be part of the synapsemlkeyvault
and azure subscription. If you are MSFT internal would like to be
added please reach out
SBT Command Guide
Scala build commands
Compiles the main, test, and integration test classes respectively
Runs all synapsemltests
Runs scalastyle check
Generates documentation for scala sources
Creates a conda environment
environment.yml if it does not already exist.
This env is used for python testing. Activate this env before using python build commands.
synapseml conda env
Compiles scala, runs python generation scripts, and creates a wheel
Generates documentation for generated python code
Installs generated python wheel into existing env
Generates and runs python tests
Environment + Publishing Commands
Downloads all datasets used in tests to target folder
Packages the library into a jar
Publishes Jar to synapseml's azure blob based maven repo. (Requires Keys)
Publishes library to local maven repo
Publishes scala and python doc to synapseml's build azure storage account. (Requires Keys)
Publishes the library to sonatype staging repo
Promotes the published sonatype artifact