Start a new topic
Implemented

How to copy an engine to another machine

This update gives simplified instructions to copy an engine to another machine. The original topic message is below.


It's now easy to copy an engine to another machine with these simple steps.

  1. Install Slate Desktop on the second machine where you want copy the engine.
  2. In the opening Slate Desktop dashboard on the first machine, select the engine you want to copy.
  3. Click the "Export" button
  4. In the dialog, navigate to a path where to save the exported engine package. A USB drive works great.
  5. Eject the USB drive from the first machine and insert it to the second machine.
  6. Open Slate Desktop on the second machine.
  7. Click the "Import" button in the opening dashboard.
  8. In the dialog, navigate to the USB drive and double-click the engine package.
  9. Slate Desktop will do all the work. When focus returns to the dashboard, you'll see the new engine ready to use.



-------------------------------------------------------------------------------------------------------------------------------------------


***** Original Topic *****


The Slate Desktop license allows you to install instances on two machines, such as your desktop to build engines and your notebook to run translations on-the-go. For these instructions, we use the default prefix value: C:\PTTools.


Before I start, this description reveals that the configuration options exposed in the GUI are significantly simplified. When you navigate the file system for the folders you need to copy, you'll see that the folder names are encoded with values you entered as well as other configuration variables. I will describe the information to find the folders you need to copy from one system to another and save a detailed explanation of the values for another topic.


An "engine" consists of three major components: SMT model, RECASER model and one or more translation configuration file(s).


ALL MODELS


The SMT model is responsible for generating target language text from the source language text. The RECASER model is a specialized smt model responsible for restoring natural casing and spacing to the generated target language text. All models are under the C:\PTTools\Workspace\MODELS folder. The subfolders start with the prefix followed by encoded values:

  • smt --prefix for source-to-target SMT models
  • recaser --prefix for target RECASER models
  • -s=<source language code> -- as you entered in the GUI
  • -t=<target language code> -- as you entered in the GUI
  • -p=<build name> -- you entered in the GUI, translation model (TM) corpus name
  • -a=<word-aligner.configuration> -- defaults="giza.grow-diag-final-and", not configurable via GUI
  • -g=<max-phrase-length> -- default=7, AKA "tm-grams", the maximum n-gram window for the TM build, not configurable via GUI
  • -l=<build name> -- you entered in the GUI, language model (LM) corpus name, future versions allow interchanging different TM and LM builds
  • -T=<language model type> -- value=kenlm, the only language model tool supported on Windows, not configurable
  • -n=<order> -- default=5, AKA "lm-grams", or the maximum n-gram window for the LM build, not configurable via GUI


Zip the SMT model:

  1. Using Windows Explorer or other file management application, navigate to the MODELS model folder and find the subfolder name with the encoded values of your SMT model:

    C:\PTTools\Workspace\MODELS\smt-s=<SRC>-t=<TGT>-p=<BUILD_NAME>-a=giza.grow-diag-final-and-g=7-l=<BUILD_NAME>-T=kenlm-n=5

  2. Zip this folder to copy to the other system. NOTE: To reduce the size of the zip file, you can exclude the subfolder WORKING-DIR.mert1 from the zip file


Zip the RECASER model:

  1. Using Windows Explorer or other file management application, navigate to the MODELS model folder and find the subfolder name with the encoded values of your engine:

    C:\PTTools\Workspace\MODELS\recaser-t=<TGT>-l=<BUILD_NAME>-T=kenlm-n=5-a=giza.grow-diag-final-and-g=7

  2. Zip this folder to copy to the other system. NOTE: To reduce the size of the zip file, you can exclude the subfolder WORKING-DIR.mert1 from the zip file


Translation Configuration Files


Slate Desktop uses a framework to perform all workflows. Configurations that define the workflows and control the framework are stored in folders called graphs. All graphs are subfolders under the C:\PTTools\User\graphs folder. Translation graphs configure the framework to use the SMT and RECASER models for translation production. Slate Desktop ships with these translation graphs:

  • xslate-tab -- translates from tab-delimted to tab-delimited files
  • xslate-tmx -- translates from TMX to TMX files
  • xslate-txt -- translates from text to text files
  • xslate-xlf -- translates from XLIFF to XLIFF files

A minimum of two configuration files are inside each of these folders: graph.ini and user.ini. The graph.ini file defines the framework's workflow. The user.ini file stores user-defined configuration values for reuse. In addition there can be .conf files. These are copies of the user.ini file with alternate user configurations for easy recall.


Zip the translation configuration files:


In each of these folders, you will find configuration files for your engine names: =<SRC>-<TGT>-<BUILD_NAME>.conf. Zip the xslate-* folders with the engines' configuration files. I recommend that you remove the graph.ini and user.ini files from each of the folders so they don't overwrite the files in the destination system. This is not absolutely necessary because these files should be the same on both system otherwise changed them manually.


Deploy the files:


Now, all that's left is to deploy (copy) the zip files to the destination system, unzip them. Exit the Slate Desktop application, and move the unzipped folders and configuration files to the corresponding locations.


Restart the Slate Desktop:


Finally, the engines will appear in the engines list when you restart Slate Desktop.


Hi Tom,


That sounds like a lot of work. Any plans to simplify this? 


Since I might be building the engines on a second computer, which I will probably be accessing through Teamviewer (which is a bit fiddly), I would like to be able to build the engines on the remote PC, and then easily send them over to my work computer. A point-and-click solution for moving engines would be greatly appreciated!


Michael

Yes, it's on the "TODO" list. An "export engine" option (button/menu?) will package an engine into a zip file. An "import engine" button will read the package and place everything properly.


I published these instructions so you have access to doing this in the interim.

Great! I've just discovered that we now have export and import buttons and they work!!!

I've exported my engine from one machine and imported on another and it all took about 5 minutes. 

Thanks very much, Tom :)

Kudos again! Note that the export/import relates only to the runtime engine. Right now, you have to go back to the original machine to regenerate the engine with updated data. Our TODO list includes adding backup/restore functions that will include everything to regenerate and update engines on different machines, or if you need to recover from rebuilding the host.

 

I didn't even know it was possible to regenerate/update an engine, so I'm happy with the runtime engine as it is! 

Login or Signup to post a comment