PYTHONPATH issue on google colab - tensorflow

From different forum and tutorial it seem that the command
!python object_detection/builders/model_builder_test.py supposed to give an output like:
Running tests under Python 3.6.9: /usr/bin/python3
[ RUN ] ModelBuilderTest.test_create_experimental_model
[ OK ] ModelBuilderTest.test_create_experimental_model
[ RUN ] ModelBuilderTest.test_create_faster_rcnn_model_from_config_with_example_miner
[ OK ] ModelBuilderTest.test_create_faster_rcnn_model_from_config_with_example_miner
[ RUN ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_faster_rcnn_with_matmul
[ OK ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_faster_rcnn_with_matmul
[ RUN ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_faster_rcnn_without_matmul
[ OK ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_faster_rcnn_without_matmul
[ RUN ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_mask_rcnn_with_matmul
[ OK ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_mask_rcnn_with_matmul
[ RUN ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_mask_rcnn_without_matmul
[ OK ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_mask_rcnn_without_matmul
[ RUN ] ModelBuilderTest.test_create_rfcn_model_from_config
[ OK ] ModelBuilderTest.test_create_rfcn_model_from_config
[ RUN ] ModelBuilderTest.test_create_ssd_fpn_model_from_config
[ OK ] ModelBuilderTest.test_create_ssd_fpn_model_from_config
[ RUN ] ModelBuilderTest.test_create_ssd_models_from_config
[ OK ] ModelBuilderTest.test_create_ssd_models_from_config
[ RUN ] ModelBuilderTest.test_invalid_faster_rcnn_batchnorm_update
[ OK ] ModelBuilderTest.test_invalid_faster_rcnn_batchnorm_update
[ RUN ] ModelBuilderTest.test_invalid_first_stage_nms_iou_threshold
[ OK ] ModelBuilderTest.test_invalid_first_stage_nms_iou_threshold
[ RUN ] ModelBuilderTest.test_invalid_model_config_proto
[ OK ] ModelBuilderTest.test_invalid_model_config_proto
[ RUN ] ModelBuilderTest.test_invalid_second_stage_batch_size
[ OK ] ModelBuilderTest.test_invalid_second_stage_batch_size
[ RUN ] ModelBuilderTest.test_session
[ SKIPPED ] ModelBuilderTest.test_session
[ RUN ] ModelBuilderTest.test_unknown_faster_rcnn_feature_extractor
[ OK ] ModelBuilderTest.test_unknown_faster_rcnn_feature_extractor
[ RUN ] ModelBuilderTest.test_unknown_meta_architecture
[ OK ] ModelBuilderTest.test_unknown_meta_architecture
[ RUN ] ModelBuilderTest.test_unknown_ssd_feature_extractor
[ OK ] ModelBuilderTest.test_unknown_ssd_feature_extractor
----------------------------------------------------------------------
Ran 17 tests in 0.149s
But in my case it is not throwing any out put. Is it normal?
Here are my whole codes and output:
%cd /content
!git clone --quiet https://github.com/tensorflow/models.git
!apt-get install -qq protobuf-compiler python-pil python-lxml python-tk
!pip install -q Cython contextlib2 pillow lxml matplotlib
!pip install -q pycocotools
%cd /content/models/research
!protoc object_detection/protos/*.proto --python_out=.
import os
os.environ['PYTHONPATH'] += ':/content/models/research/:/content/models/research/slim/'
!python object_detection/builders/model_builder_test.py
/content
fatal: destination path 'models' already exists and is not an empty directory.
/content/models/research

Related

How to have multiple patterns for lint-staged?

I had it match on .rb and .js files for instance.
e.g. **/*.{js,rb}
And wanted to also match on Gemfile and Rakefile for instance.
the solution was to recursively use {}, e.g.
"lint-staged": {
"{Gemfile,Rakefile,**/*.{js,rb,rake,ru}}": [
"./node_modules/prettier/bin-prettier.js --write"
],
"**/*.js": [
"node_modules/eslint/bin/eslint.js"
],
"{Gemfile,Rakefile,**/*.{rb,rake,ru}}": [
"bundle exec rubocop -a"
]
}

COPY from stdin PostgreSQL

I am having a hard time with this bulk copy syntax. Looks to me like I followed the correct syntax from a tutorial i checked out. But there seems to be a syntax error that i cannot detect. Need some help on this.
COPY aza_ods_version2.test2
FROM {'/Users/kevingitonga/Desktop/test1.csv' | STDIN}
[ [ WITH ]
[ BINARY ]
[ OIDS ]
[ DELIMITER [ AS ] ',' ]
[ CSV [ HEADER ]]

Rabbitmq management plugins - RMQ 3.6.5

I am having hard time here in enabling rmq management console on company laptop. I dont have admin rights to run cmd as admin here.
I am trying to enable console and see following output after that when I restart rabbit mq service and try to access console using http://localhost:15672, I am not able to access. I have also pasted output of list command for plugins.
(I am able to connect to broker via spring application though but cant access this console to view queues.)
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5\sbin>rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit#PCNAME... failed.
* Could not contact node rabbit#PCNAME.
Changes will take effect at broker restart.
* Options: --online - fail if broker cannot be contacted.
--offline - do not try to contact broker.
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5\sbin>rabbitmq-plugins list
Configured: E = explicitly enabled; e = implicitly enabled
| Status: [failed to contact rabbit#PCNAME - status not shown]
|/
[e ] amqp_client 3.6.5
[ ] cowboy 1.0.3
[ ] cowlib 1.0.1
[e ] mochiweb 2.13.1
[ ] rabbitmq_amqp1_0 3.6.5
[ ] rabbitmq_auth_backend_ldap 3.6.5
[ ] rabbitmq_auth_mechanism_ssl 3.6.5
[ ] rabbitmq_consistent_hash_exchange 3.6.5
[ ] rabbitmq_event_exchange 3.6.5
[ ] rabbitmq_federation 3.6.5
[ ] rabbitmq_federation_management 3.6.5
[ ] rabbitmq_jms_topic_exchange 3.6.5
[E ] rabbitmq_management 3.6.5
[e ] rabbitmq_management_agent 3.6.5
[ ] rabbitmq_management_visualiser 3.6.5
[ ] rabbitmq_mqtt 3.6.5
[ ] rabbitmq_recent_history_exchange 1.2.1
[ ] rabbitmq_sharding 0.1.0
[ ] rabbitmq_shovel 3.6.5
[ ] rabbitmq_shovel_management 3.6.5
[ ] rabbitmq_stomp 3.6.5
[ ] rabbitmq_top 3.6.5
[ ] rabbitmq_tracing 3.6.5
[ ] rabbitmq_trust_store 3.6.5
[e ] rabbitmq_web_dispatch 3.6.5
[ ] rabbitmq_web_stomp 3.6.5
[ ] rabbitmq_web_stomp_examples 3.6.5
[ ] sockjs 0.3.4
[e ] webmachine 1.10.3

Can't enable plugin in rabbitmq 3.7.3

I have a web application that receives location data via web sockets. I have installed rabbitmq on my mac via homebrew to run the web sockets locally. I am trying to enable rabbitmq_web_stomp but I get this error :
`
rabbitmq-plugins enable rabbitmq_web_stomp
Error:
{:plugins_not_found, [:rabbitmq_management_visualiser]
And when I run rabbitmq-plugins list
WARNING - plugins currently enabled but missing: rabbitmq_management_visualiser
Configured: E = explicitly enabled; e = implicitly enabled
| Status: * = running on rabbit#localhost
|/
[E*] rabbitmq_amqp1_0 3.7.3
[ ] rabbitmq_auth_backend_cache 3.7.3
[ ] rabbitmq_auth_backend_http 3.7.3
[ ] rabbitmq_auth_backend_ldap 3.7.3
[ ] rabbitmq_auth_mechanism_ssl 3.7.3
[ ] rabbitmq_consistent_hash_exchange 3.7.3
[ ] rabbitmq_event_exchange 3.7.3
[ ] rabbitmq_federation 3.7.3
[ ] rabbitmq_federation_management 3.7.3
[ ] rabbitmq_jms_topic_exchange 3.7.3
[E*] rabbitmq_management 3.7.3
[e*] rabbitmq_management_agent 3.7.3
[E*] rabbitmq_mqtt 3.7.3
[ ] rabbitmq_peer_discovery_aws 3.7.3
[ ] rabbitmq_peer_discovery_common 3.7.3
[ ] rabbitmq_peer_discovery_consul 3.7.3
[ ] rabbitmq_peer_discovery_etcd 3.7.3
[ ] rabbitmq_peer_discovery_k8s 3.7.3
[ ] rabbitmq_random_exchange 3.7.3
[ ] rabbitmq_recent_history_exchange 3.7.3
[ ] rabbitmq_sharding 3.7.3
[ ] rabbitmq_shovel 3.7.3
[ ] rabbitmq_shovel_management 3.7.3
[E*] rabbitmq_stomp 3.7.3
[ ] rabbitmq_top 3.7.3
[ ] rabbitmq_tracing 3.7.3
[ ] rabbitmq_trust_store 3.7.3
[e*] rabbitmq_web_dispatch 3.7.3
[ ] rabbitmq_web_mqtt 3.7.3
[ ] rabbitmq_web_mqtt_examples 3.7.3
[ ] rabbitmq_web_stomp 3.7.3
[ ] rabbitmq_web_stomp_examples 3.7.3
But when look at docs https://www.rabbitmq.com/plugins.html
It says rabbitmq_management_visualiser is discontinued and no longer maintained.
How do I fix this?
You should remove rabbitmq_management_visualiser from list of enabled plugins in /usr/local/etc/rabbitmq/enabled_plugins
Im my case i had an azure container and i discovered plugins were installed under /opt/rabbitmq/plugins instead of /usr/lib/rabbitmq/plugins according with the official guide:
https://www.rabbitmq.com/prometheus.html
I changed the plugins path in the script and i installed the plugin.

Not able to add Rabbitmq plugin

I was following this http://www.rabbitmq.com/plugin-development.html link to build rabbitmq plugin https://github.com/rabbitmq/rabbitmq-web-mqtt
after building i ONLY copied rabbitmq_mqtt.ez to /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.2/plugins
running sudo rabbitmq-plugins enable rabbitmq_web_mqtt
shows :
The following plugins have been enabled:
cowlib
cowboy
rabbitmq_web_mqtt
Applying plugin configuration to rabbit#manish-Lenovo-G510... failed.
Error: {could_not_start,rabbitmq_web_mqtt,
{undef,
[{lager_config,get,
[{rabbit_log_lager_event,loglevel},{0,[]}],
[]},
{rabbit_web_mqtt_app,mqtt_init,0,
[{file,"src/rabbit_web_mqtt_app.erl"},{line,69}]},
{rabbit_web_mqtt_app,start,2,
[{file,"src/rabbit_web_mqtt_app.erl"},{line,31}]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},{line,269}]}]}}
Running sudo rabbitmq-plugins list
Configured: E = explicitly enabled; e = implicitly enabled
| Status: * = running on rabbit#manish-Lenovo-G510
|/
[e*] amqp_client 3.6.2
[e ] cowboy 1.0.3
[e ] cowlib 1.0.1
[e*] mochiweb 2.13.1
[ ] rabbitmq_amqp1_0 3.6.2
[ ] rabbitmq_auth_backend_ldap 3.6.2
[ ] rabbitmq_auth_mechanism_ssl 3.6.2
[ ] rabbitmq_consistent_hash_exchange 3.6.2
[ ] rabbitmq_event_exchange 3.6.2
[ ] rabbitmq_federation 3.6.2
[ ] rabbitmq_federation_management 3.6.2
[E*] rabbitmq_management 3.6.2
[e*] rabbitmq_management_agent 3.6.2
[ ] rabbitmq_management_visualiser 3.6.2
[E*] rabbitmq_mqtt 3.6.2
[ ] rabbitmq_recent_history_exchange 1.2.1
[ ] rabbitmq_sharding 0.1.0
[ ] rabbitmq_shovel 3.6.2
[ ] rabbitmq_shovel_management 3.6.2
[ ] rabbitmq_stomp 3.6.2
[ ] rabbitmq_tracing 3.6.2
[e*] rabbitmq_web_dispatch 3.6.2
[E ] rabbitmq_web_mqtt
[ ] rabbitmq_web_stomp 3.6.2
[ ] rabbitmq_web_stomp_examples 3.6.2
[ ] sockjs 0.3.4
[e*] webmachine 1.10.3
I am not able to connect using paho JS client. So what is causing the issue? I tried port 1888, 8083,8883,15675
Applying plugin configuration to rabbit#manish-Lenovo-G510... failed.
Error: {could_not_start,rabbitmq_web_mqtt,
{undef,
[{lager_config,get,
Lager is only in the version 3.7.0, most likely you built the master branch.
To build the plugin version 3.6.2 you should:
git clone https://github.com/rabbitmq/rabbitmq-public-umbrella.git .
make up BRANCH=rabbitmq_v3_6_2
cd deps/rabbitmq_web_mqtt
make dist
EDIT
you have to disable and remove the old .ez file, after copied the new one, you have to enable the plugin.
just tried and it works correctly, see the test: