Tensor Serving Container - Error Too many open files - tensorflow-serving

After adding new models to the tensor serving container , after some time it is throwing below error
tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc:369]
FileSystemStoragePathSource encountered a file-system access error:
/; Too many open files
What is the way to stop getting this error

Related

Google Colab Crash When Loading Pre-Trained Transformer

I am new to transformers. I have fine-tuned my MT5 model in Google Colab and saved it with save_pretrained(PATH). However, when I tried to load the model with MT5ForConditionalGeneration.from_pretrained(PATH), Google Colab keep crashing with log error:
terminate called after throwing an instance of 'std::__ios_failure'
what(): basic_filebuf::underflow error reading the file: iostream error
I suspect that it was out-of-memory problem, but I have no clue how to fix it.

Vue 3 browser caching doesnt pick latest files

We have a build.js code in our project which makes a duplicate of our client directory and adds a folder inside src.
example -
client/src/components will become dist/src/abcxy/components
abcxy will change every time we create a new build.
Now the problem is that the browser tries to find the old dist files from the cache and is unable to find them, instead of finding new files it gives an error in the console.
The error changes depending on the browser I am using
EXAMPLE ERROR - Failed to load ‘http://localhost/src/pbtsg/components/report/reports.js’. A ServiceWorker intercepted the request and encountered an unexpected error.

Empty gnocchi metric list in Devstack

I installed devstack and ceilometer by adding the following lines in the local.conf file:
enable_plugin ceilometer https://opendev.org/openstack/ceilometer.git
CEILOMETER_BACKEND=gnocchi
Devstack works correctly (I am able to create images, instances, etc.). The problem is that I cannot visualize the metrics and resources using "gnocchi metric list" and "gnocchi resource list". No errors but the body response is empty.
"ceilometer-upgrade" gives the following error:
DEBUG ceilometer.cmd.storage Upgrade Gnocchi resource types upgrade /opt/stack/ceilometer/ceilometer/cmd/storage.py:42
While "ceilometer-polling" prints "The resource could not be found".
How can I resolve this issue? Thanks!

Create Version Failed. Bad model detected with error: "Error loading the model" - AI Platform Prediction

I created a model through AI Platform UI that uses a global endpoint. I am trying to deploy a basic tensorflow 1.15.0 model I exported using the Saved Model builder. When I try to deploy this model I get a Create Version Failed. Bad model detected with error: "Error loading the model" error in the UI and the I see the following in the logs:
ERROR:root:Failed to import GA GRPC module. This is OK if the runtime version is 1.x
Failure: Could not reach metadata service: Internal Server Error.
ERROR:root:Command '['/tools/google-cloud-sdk/bin/gsutil', '-o', 'GoogleCompute:service_account=default', 'cp', '-R', 'gs://cml-365057443918-1608667078774578/models/xsqr_global/v6/7349456410861999293/model/*', '/tmp/model/0001']' returned non-zero exit status 1.
ERROR:root:Error loading model: 'generator' object has no attribute 'next'
ERROR:root:Error loading the model
Framework/ML runtime version: Tensorflow 1.15.0
Python: 3.7.3
What is strange is that the gcloud ai-platform local predict works correctly with this exported model, and I can deploy this exact same model on a regional endpoint with no issues. It only gives this error if I try to use a global endpoint model. But I need the global endpoint because I plan on using a custom prediction routine (if I can get this basic model working first).
The logs seem to suggest an issue with copying the model from storage? I've tried giving various IAM roles additional viewer permissions, but I still get the same errors.
Thanks for the help.
I think it's the same issue as https://issuetracker.google.com/issues/175316320
The comment in the issue says the fix is now rolling out.
Today I faced the same error (ERROR: (gcloud.ai-platform.versions.create) Create Version failed. Bad model detected with error: "Error loading the model") & for those who wants a summary:
The recommendation is to use n1* machine types (for example: n1-standard-4) via regional endpoints (for example: us-central1) instead of mls1* machines while deploying version. Also I made sure to mention the same region (us-central1) while creating the model itself using the below command, thereby resolving the above mentioned error.
!gcloud ai-platform models create $model_name
--region=$REGION

Is it possible to load TensorFlow model using wamp in a simple html page

I am trying to load already trained model into web browser for further use, but I am stuck in the loading step
I am using WAMP and not using node, because the the project is super small and not meant for anything serious.
My question would be, is it even possible to load the module w/o the node ?
I have set up WAMP and folder structure for the mini-project is:
.../www/TestProject/
- index.html
- model/
- model.json
- group1-shard1of1.bin
In the index.html file I tried following ways to load the model
- tf.loadLayersModel('http://...')
- tf.loadLayersModel('localstorage://...')
- tf.loadLayersModel('model/model.json')
I get error messages:
index.html:13 Uncaught (in promise) TypeError: Failed to fetch
Or
Uncaught (in promise) TypeError: Failed to fetch
This is my current script:
<script>
async function model(){
const model = await tf.loadLayersModel('http://model/model.json');
}
model();
</script>
It is possible to load the model since wamp will load all static assets.
However by changing the name of the weight file, it could not be loaded since it is referenced in the topology file model.json. The name of the files need to be kept as they were when they were generated or the corresponding names should changed in the model.json.
Yes, TensorFlow.js can work in Node.js OR client side in the web browser like you want. In that case, so long as you host the HTML, CSS, JS, and the model files so they are accessible then it would work fine. However it seems you have changed the file name to modelbin.bin instead of model.bin. My guess is that you are on Windows and have file extensions turned off so it looked like you had the incorrect name but in fact it was there but hidden. I would recommend ensuring this default extension hiding behaviour in Windows is turned off to prevent this in the future. Simply go to Windows control panel (Start -> Control Panel) and then search for "Folder Options". Click on the search result which opens up new window and click on the "view" tab. In that big list of options uncheck the "Hide extensions for known file types" and you should now see the full name of files on your machine. Rename the file to be just model.bin and then it should load correctly.