Unable to store models in the AWS


(Sandeep Yadav Batta) #1

Rasa NLU version: 0.14.0a1 Operating system (windows, osx, …): Ubuntu Content of model configuration file:

##### I am using json format for config, because I am unable to write s3 environment variables in yml config format file.

  "pipeline": "spacy_sklearn",
  "storage": "aws",
  "AWS_SECRET_ACCESS_KEY": "secret_access_key",
  "AWS_ACCESS_KEY_ID": "access_key",
  "AWS_DEFAULT_REGION": "us-west-1",
  "BUCKET_NAME": "mybucket",
  "AWS_ENDPOINT_URL": "apigateway.us-west-1.amazonaws.com"

##### This is my yml config file. Dont know how to give aws environment variables in yml format.
 - name: "nlp_spacy"
 - name: "tokenizer_spacy"
 - name: "ner_duckling"
   dimensions: ["time", "phone-number", "url", "email"]
 - name: "ner_crf"
 - name: "ner_synonyms"
 - name: "intent_featurizer_count_vectors"
 - name: "intent_classifier_tensorflow_embedding"
   intent_tokenization_flag: true
   intent_split_symbol: ","

What I am trying to do is store a model into AWS cloud using this command:

python -m rasa_nlu.server -c config/sample_aws_config.json --storage aws --path /models/

I am training my model from Postman

Issue: 2019-01-10 17:23:59 ERROR rasa_nlu.data_router - Failed to list projects. Make sure you have correctly configured your cloudstorage settings. Traceback (most recent call last): File “/rasa_nlu/data_router.py”, line 205, in _list_projects_in_cloud p = get_persistor(self.remote_storage)

File “/rasa_nlu/persistor.py”, line 28, in get_persistor os.environ.get(“apigateway.us-west-1.amazonaws.com”))

File “/rasa_nlu/persistor.py”, line 147, in init self._ensure_bucket_exists(bucket_name)

File “/rasa_nlu/persistor.py”, line 181, in _ensure_bucket_exists CreateBucketConfiguration=bucket_config)

File “/lib/python3.6/site-packages/boto3/resources/factory.py”, line 520, in do_action response = action(self, *args, **kwargs)

File “/lib/python3.6/site-packages/boto3/resources/action.py”, line 83, in call response = getattr(parent.meta.client, operation_name)(**params)

File “/lib/python3.6/site-packages/botocore/client.py”, line 324, in _api_call return self._make_api_call(operation_name, kwargs)

File “/lib/python3.6/site-packages/botocore/client.py”, line 596, in _make_api_call api_params, operation_model, context=request_context)

File “/lib/python3.6/site-packages/botocore/client.py”, line 629, in _convert_to_request_dict api_params, operation_model, context)

File “/lib/python3.6/site-packages/botocore/client.py”, line 658, in _emit_api_params params=api_params, model=operation_model, context=context)

File “/lib/python3.6/site-packages/botocore/hooks.py”, line 227, in emit return self._emit(event_name, kwargs)

File “/lib/python3.6/site-packages/botocore/hooks.py”, line 210, in _emit response = handler(**kwargs)

File “/lib/python3.6/site-packages/botocore/handlers.py”, line 222, in validate_bucket_name if VALID_BUCKET.search(bucket) is None: TypeError: expected string or bytes-like object

2019-01-10 17:24:00 WARNING rasa_nlu.project - Failed to list models of project tester. expected string or bytes-like object

Please Help me with is issue…