Unable to store models in the AWS

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.
pipeline:
 - 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…

Hi, it seems you need to set env vars https://rasa.com/docs/nlu/master/persist/#section-persistence

I have done it with minio, aws should be the same

I have setup my environment variables and run this command

rasa run -m models --enable-api --log-file out.log --remote-storage aws

But no luck, please help

add a trained model aws bucket then run

rasa run -m **model name @ AWS** --enable-api --log-file out.log --remote-storage aws

1 Like