tensorflow object detection pre-trained models SageMaker deployment - amazon-sagemaker

I tried to deploy EfficientDet model from tf2 object detection api to sagemaker using the instruction here: https://docs.aws.amazon.com/sagemaker/latest/dg/tf.html
enter image description here
and similar to this example notebook:https://github.com/aws-samples/amazon-sagemaker-tensorflow-object-detection-api/blob/main/3_predict/deploy_endpoint.ipynb
when i tried to deploy with
model = TensorFlowModel(name=name_from_base('tf2-object-detection'), model_data=model_artefact, role=role, framework_version='2.2' )
predictor = model.deploy(initial_instance_count=1, instance_type='ml.m5.xlarge')
I received the following error: UnexpectedStatusException: Error hosting endpoint tf2-object-detection-2022-05-28-10-46-50-583: Failed. Reason: The customer:primary container for production variant AllTraffic did not pass the ping health check. Please check CloudWatch logs for this endpoint..
what could have caused this error?
Thanks in advance!
Update: when i checked cloud watch i found this log error:
ValueError: no SavedModel bundles found!

I managed to solve this... the issue was that my model dir structure had to follow this format:
some_name
|__ Some positive number that represents version (For eg: 1)
|__ saved_model.pb
|__ variables
|__
I didn't create a top file with a version number and apparently my saved model file wasn't recognized, but adding it solved it.

Related

Composer 2.5.1 Symfony Ux-React Failed to Download Webpack Encore Pack

I have a Symfony project that uses composer and react. I am trying to download the symfony/ux-react package with composer following this link: https://symfony.com/bundles/ux-react/current/index.html
However, when I run composer require symfony/ux-react I get the following error:
- Downloading symfony/webpack-encore-pack (v1.0.2)
0/1 [>---------------------------] 0% Failed to download symfony/webpack-encore-pack from dist: The "https://api.github.com/repos/symfony/webpack-encore-pack/zipball/f9f4e91659e5f55de370d6aebe77e64bce35e4d3" file could not be downloaded (HTTP/2 404 ):
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#download-a-repository-archive"}
Now trying to download from source
- Syncing symfony/webpack-encore-pack (v1.0.2) into cache
Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
When working with _public_ GitHub repositories only, head to https://github.com/settings/tokens/new?scopes=&description=Composer+on+lex-Blade-15-Mid-2019-Base+2023-01-27+1205 to retrieve a token.
This token will have read-only permission for public information only.
When you need to access _private_ GitHub repositories as well, go to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+lex-Blade-15-Mid-2019-Base+2023-01-27+1205
Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer.
Tokens will be stored in plain text in "/home/lex/.config/composer/auth.json" for future use by Composer.
For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth
Token (hidden):
I then create a token. Upon copy pasting it into the terminal:
Token stored successfully.
1/1 [============================] 100%
In Git.php line 471:
Failed to execute git clone --mirror -- 'https://ghp...PNs:x-oauth-basic#github.com/symfony/webpack-encore-pack.git' '/home/lex/.cache/composer/vcs/https---github.com-symfony-webpack-encore-p
ack.git/'
Cloning into bare repository '/home/lex/.cache/composer/vcs/https---github.com-symfony-webpack-encore-pack.git'...
remote: Repository not found.
fatal: repository 'https://github.com/symfony/webpack-encore-pack.git/' not found
Anyone know a fix for this? It appears that webpack-encore-pack is depreciated.
Spoke too soon. Found this link: https://github.com/symfony/symfony/discussions/42700
By uninstalling webpack encore with composer remove symfony/webpack-encore-pack and then trying composer require symfony/ux-react, no error occurred.

AppEngine deploy error - HttpIoException: Error posting to URL

Today we start recieving this message when trying to deploy.
...
Scanned 8750 files.
Scanned 9000 files.
Scanned 9250 files.
Scanned 9500 files.
Scanned 9750 files.
Initiating update.
Cloning 711 static files.
Cloning 9233 application files.
Cloned 2000 files.
Cloned 4000 files.
Cloned 6000 files.
Cloned 8000 files.
Deploying:
Uploading 0 files.
Initializing precompilation...
Deploying new version.
Rolling back the update.
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/deploy?app_id=facturanube&version=1&
500 Internal Server Error
<h3>Server Error</h3><p>A server error has occurred.</p>
Debugging information may be found in C:\Users\usuario\AppData\Local\Temp\appengine-deploy6314649189927600314.log
Debugging information file contents:
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/deploy?app_id=si-nube&version=1&
500 Internal Server Error
<h3>Server Error</h3><p>A server error has occurred.</p>
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:303)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:254)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:233)
at com.google.appengine.tools.admin.LoggingClientDeploySender.send(LoggingClientDeploySender.java:47)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:1100)
at com.google.appengine.tools.admin.AppVersionUpload.deploy(AppVersionUpload.java:949)
at com.google.appengine.tools.admin.AppVersionUpload.commit(AppVersionUpload.java:850)
at com.google.appengine.tools.admin.AppVersionUpload.uploadFilesTransaction(AppVersionUpload.java:176)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:151)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:474)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:55)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:400)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Important considerations:
The appengine-web.xml file has no errors.
We tried deploying in different versions with no success.
The application can be deployed in another appengine application, but not in our production application.
We have no cuota-related problems. Our payments have no
problems.
Our current versions:
GWT SDK 2.4.0
App Engine 1.9.54
Java 7
Update
I was able to deploy today (2018/03/18) with no changes to code or configuration files. I guess Google did something to solve the issue.
500 A server error has occurred on deployment is usually related to malformed configs, including app.yaml and cron.yaml (and Java equivalents). Or if unsupported stanzas are included. Please check your GAE app configs and attempt to strip them down to the essentials just to narrow down which stanzas/flags are messing up the deployment.

bad import "syscall" for cloud storage APIs

I am following the instructions on https://cloud.google.com/appengine/docs/go/googlecloudstorageclient/download to begin migrating some code from the, now deprecated, Files API to the new Cloud Storage API without success.
The steps I'm following are ...
I'm running appengine v1.9.23 which is later than the required appengine v1.8.1.
My $GOPATH is set, so I skip step #1.
I proceed to step #2:
goapp get -u golang.org/x/oauth2
goapp get -u google.golang.org/cloud/storage
I am not developing on a managed VM, so I skip step #3.
Now when I run the application, I get:
go-app-builder: Failed parsing input: parser: bad import "syscall" in goapp/src/golang.org/x/net/internal/nettest/error_posix.go
What am I doing wrong?
Steps to reproduce
Download an install the Google Appengine runtime, version 1.9.23 from https://console.cloud.google.com/storage/browser/appengine-sdks/featured/ . Follow the installation instructions documented on https://cloud.google.com/appengine/downloads?hl=en
Create an appengine project directory:
% mkdir $HOME/myapp
Create a new app.yaml file as ~/myapp/app.yaml. Read the directions on the Google website for details: https://cloud.google.com/appengine/docs/go/config/appconfig
I use a version that does not have the static resources:
application: myapp
version: alpha-001
runtime: go
api_version: go1
handlers:
- url: /.*
script: _go_app
Create a location for the Go source files.
% mkdir $HOME/myapp/go
Set your GOPATH to the location of your sources
% export GOPATH=$HOME/myapp/go
Get the Go appengine example project: https://github.com/golang/example
% goapp get github.com/golang/example/appengine-hello
This command will download the example app to the first path entry in the GOPATH
Install the Google Cloud Storage client libraries as directed in https://cloud.google.com/appengine/docs/go/googlecloudstorageclient/download . Reference the steps at the top of this question for more details. Following the directions should result in you running 2 commands:
% go get -u golang.org/x/oauth2
% go get -u google.golang.org/cloud/storage
Attempt to run your go application
% goapp serve
You will see the following compilation error (no stack trace):
2015/12/23 10:37:07 go-app-builder: Failed parsing input: parser: bad import "syscall" in go/src/golang.org/x/net/ipv6/control_unix.go
This error is caused by either of two scenarios:
1) Implicitly importing syscall by importing another package that uses it, as referenced in this related question.
2) Having your package source files in your GOPATH located in a directory at or below the same level as your project's app.yaml (eg. app.yaml in ~/go, and packages sources in ~/go/gopath/src). If a package like x/net/internal/nettest exists in your GOPATH the syscall import will be parsed by goapp at compile time and throw the compilation error.
Avoiding these two scenarios should be sufficient to prevent any bad import "syscall" errors or related compilation errors.
Reproduced the initial steps above and got a similar error, even if not explicitly mentioning syscall. However, running “goapp serve” in the appengine-hello directory results in no error at all.
Adam’s explanation at point 2 applies here correctly: one needs to place the app.yaml file at the right level in the directory structure.
sirupsen/logrus references syscall.
They have an appengine tag specified, not to include syscall so it's usable in AppEngine, something like go build -tags appengine as per issue 310.
However I haven't yet succeeded including it in an AppEngine project so that this build param could be forwarded and specified somewhere so that it goes through. I'll come back to update if I manage.

SolrCore Initialization Failures on JBoss 7

I have deployed a stand alone instance of Solr 5.2.1 on JBoss 7 using these very simple instructions from the Solr wiki:
http://wiki.apache.org/solr/SolrInstall and
http://wiki.apache.org/solr/SolrJBoss
I have set my solr.solr.home (which points to the folder copied directly from example/example-DIH) this folder has 5 sub folders (db,mail,rss,solr and tika) I have made no modifications to any of them, each has conf and some have lib folders, which I assume is what Solr is looking for....
solr.data.dir I have not set in my environment variable as I don't know where it should point to? I had planed to point it to a coreName/data once I have everything running, but that means I can only have 1 core?
Solr does start and I can see the console, however I get the following Initialization Failures:
tika: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'solr.DataImportHandler'
db: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'solr.DataImportHandler'
mail: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'solr.DataImportHandler'
rss:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'solr.DataImportHandler'
solr: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'solr.DataImportHandler'
Clearly Solr is looking for these libraries, I just don't know where they are or how to tell Solr to look in the 5 folders described above, I had hoped the war file would have all the necessary libs it needed.
Unfortunately I am not sure what needs to be configured / added next and the wiki seems to lead one to a point and then just stop short of explaining additional configuration steps.
Can somebody point me in the correct direction to go from here?
Also is it possible to secure the admin console (Jboss7 - Solr5.2.1)
Thanks
Marc
Mostly including following in solrconfig.xml should resolve the issue

Cakephp App class code printing on the page and spl_autoload_register error

I have moved the CakePHP installation from my development server to production server (Config file and htaccess updated).
The production server was using an older version of PHP and I have requested the host to upgrade it. After they upgraded the PHP version, the site printing the php code on the webpage (Class : /lib/Cake/core/app) .. Also it displaying a fatal error on the bottom of the page, its below
Fatal error: Uncaught exception 'LogicException' with message 'Passed
array does not specify an existing static method (class 'App' not
found)' in /xxxxxxx/lib/Cake/bootstrap.php:154 Stack trace: #0
/xxxxxxx/lib/Cake/bootstrap.php(154): spl_autoload_register(Array) #1
/xxxxxxx/app/webroot/index.php(92): include('/xxxxxxx/pu...') #2
{main} thrown in /xxxxxxx/lib/Cake/bootstrap.php on line 154
Please help..
Have you checked the PHP version has actually changed, did you check (with phpinfo())?
Apparently, CakePHP was unable to find or load the App class (/xxxx/lib/Cake/core/App.php).
It's possible that paths have changed since the update, however, (if you're using CakePHP 2.3.1) line 134 of that same file uses this to load that file:
require CAKE . 'Core' . DS . 'App.php';
If the file was not present or could not be loaded, the script should stop at that point.
To check if your paths are correct, try to debug that path;
echo CAKE . 'Core' . DS . 'App.php'; die();
If that path is correct (my guess it is, otherwise the require should have stopped the script already as mentioned above), there is something wrong with the content of the App.php file. Maybe something corrupted the file (partial upload?) or incorrect line-endings caused PHP to interpret it incorrectly.
If the page is really showing the complete source of the App class, it may be possible you're (inadvertendly) using php 'short opening tags' and this has been disabled in the new configuration <? which may be cause, for example if a space is there is a space after the <? - <? PHP
More on short opening tags can be found here:
Are PHP short tags acceptable to use?

Resources