Google automl train using one account and execute translations with another? - google-cloud-platform

We are using the AutoML service in Google with highly trained models specific to our business. We are looking for a solution where we can train a model in a separate "training & testing" account, then somehow use or move that model into our production account.
Is this something that is possible? I.E. Export then import the model? Or some function built right into the platform where we can "move" a trained model from one account to another?
The reason for this, is we have a production budget for translation service usage, but the training of the model falls outside of that cost. We want to physically separate this activity in platform if possible.
Thanks.

According to the docs, you can export a model o export your custom model to Cloud Storage, download the model to your server, and then use Docker to make the model available for predictions.
After that, you have to download your exported model from Cloud Storage and start the Docker container, so your model is ready to receive prediction requests in another project.
https://cloud.google.com/automl-tables/docs/model-export

Related

GCP: how to transfer a model to another project

I have a Natural Language model (within a data set) in a certain project in GCP.
How can I move these dataset and its model to another project?
Let's suppose that you are using AutoML Natural Language. There is not a direct mechanism to migrate the model to another project. Nevertheless, there is a current feature request for this functionality, you can upvote the PIT for demonstrate your interest.
The only available option I can think of is exporting the dataset from the existing project, import the dataset and retrain your model in the new project.

Unablee toexport trained model from AutoML vision

I trained a model using google AutoML Vision and now I want to export it to use it locally, I tried this tutorial from Google official doc with no success.
Actually, in model list, when I click the three dots (more actions) there is no export option:
Even in the test & use page there is no option to export the model:
Thanks in advance,
First of all, the tutorial you are following is for AutoML tables and, although similar, is not exactly the same as for AutoML Vision.
For AutoML Vision you can train two types of models, Cloud hosted and Edge-exportable. As the name may infer, only the second ones can be exported.
Here you can see the documentation for exporting AutoML Vision Edge models.
My assumption is you have trained a Cloud hosted model which is not exportable.
There is currently a feature request opened to allow this behavior. You can find it here. If you would also be interested on it you can star it to keep updated about the progress.

Training multiple model in AWS Sagemaker

Can I train multiple model in AWS Sagemaker by evaluating the models is train.py script and also how to get back multiple metrics from multiple models?
Any links, docs or videos would be useful.
Yes, what you write in a sagemaker training script (assuming you use something that lets you pass custom code like your own container or a framework container) is flexible, and does not need to be just one model or even ML. You can definitely write multiple model trainings in a single container, and pull all related metrics using SageMaker metric capture via regex, see an example regex here with the Sklearn random forest.
That being said, it is often a better idea to separate things and have one model per SageMaker job, because of the following reasons among other:
It allows you to separate model metadata and metrics and compare
them easily with the SageMaker metadata service
It allows you to specialize hardware to each model and get better economics. Each model has its own sweet spot when it comes to CPU, GPU, RAM
It allows you to use the exact same container for single training but
also for bayesian hyperparameter search, an method that can be
both faster and cheaper than regular gridsearch.

Exporting Google cloud video intelligence model

I've trained a video classification model using Google's video intelligence platform, I want to now download the model to predict on-prem for security purpose but I don't see anyway of exporting the model. Is there any way to do so?
I inform you that indeed you are right. As of today the AutoML Video Intelligence is on Beta and there is no way to export your model.
I would advise you to stay alert for the Release Notes to check for updates on the product.

Changing preprocessing in trained model on SageMaker

I have trained model on SageMaker together with prerocessing. By preprocessing I mean I added the inference.py file with input_handler and output_handler functions according to this https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/tensorflow/deploying_tensorflow_serving.rst.
I works nice but the problem is that everytime I want to change something in the preprocessing I have to retrain the model. Is there maybe some other to to do this without retraining?
A trained model is simply a function that gets arguments (the input vector) and returns an output (the output vector/value). If you changed the input with your modified pre-processing, you need to change the implementation of your function. This means that you need to retrain your model.
Retraining your models is a good habit, even if you don't change anything in your pre-processing, as the input is changing in time. The classical example of house prices is highlighting that your model is only good for the data that you trained on. If after a couple of years the market has changed, you have to retrained your model.
Some models are being retrained every day. Amazon SageMaker makes it easy to train your model, but calling the train API, and waiting for it to finish. You can automate the process of building a new Docker image (if you changed your pre-processing), calling the training API, and then calling the deployment API to SageMaker to ECS/EKS or any other container hosting service.