Documentation ¶
Overview ¶
Package controller This file contains the build controller which is responsible for building the project. Whenever a user wants to build the project, he will run the build command that uses the build controller. The build controller will install the needed build dependencies and build the project using the selected library (pyinstaller or nuitka). The final project will be built in the dist or the specified directory. The build controller also creates a symbolic link to the models folder if the user wants to.
Package controller This file contains the init controller which is responsible for initializing a new project. Whenever a user wants to create a new project, he will run the init command that uses the init controller. The init controller will create a new project folder with the given name. It will check if the user has python installed and clone the sdk into the project. After that, it will create a virtual environment, install the dependencies, and create the project files.
The final project folder should contain the following files: new-project/ ├── .gitignore ├── config.yaml ├── main.py ├── requirements.txt ├── sdk/ ├── models/ └── .venv/
Package controller This file contains the install controller which is responsible for installing an already existing project. Basically combining a slightly different init and the tidy controller features.
Whenever a user wants to install an existing project, he will clone an existing project. The existing project file structure should look like this: cloned-project/ ├── .gitignore ├── config.yaml ├── main.py ├── requirements.txt └── any user project related files However, if the user wants to run the project, there are some files missing. Here the install controller comes into play: - It will create a virtual environment - Clone the configured sdk version - Install the dependencies (requirements.txt & sdk/requirements.txt) - Install torch with cuda if the user wants to - Download the missing models - Generate the needed python code
In the end, the user should have a fully working project that should look like this: cloned-project/ ├── .gitignore ├── config.yaml ├── main.py ├── requirements.txt ├── sdk/ ├── models/ ├── .venv/ └── any user project related files
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunUpgrade ¶
func RunUpgrade(yes bool)
RunUpgrade upgrades the sdk version of a EMF project to the latest version.
Types ¶
type BuildController ¶
type BuildController struct { DestinationDir string CustomName string OneFile bool ModelsSymlink bool Library string }
func (BuildController) Build ¶
func (bc BuildController) Build(libraryPath string) (err error)
Build builds the project
func (BuildController) InstallDependencies ¶
func (bc BuildController) InstallDependencies(library string) (string, error)
InstallDependencies installs the dependencies for the project returns the path to the python executable
type InitController ¶
type InitController struct{}
type InstallController ¶
type InstallController struct{}
type TidyController ¶
type TidyController struct{}
Directories ¶
Path | Synopsis |
---|---|
Package tokenizer This file contains the remove tokenizer controller which is responsible for removing existing tokenizers in existing models
|
Package tokenizer This file contains the remove tokenizer controller which is responsible for removing existing tokenizers in existing models |