rasa x not running after upgrade rasa - rasa-nlu

I did pip install -U rasa
Now I get this error with rasa x
rasa.core.exceptions.StoryParseError: Invalid story format. Failed to parse '## happy path
* latest_mobiles
- brand_form
- form{"name": "brand_form"}
- form{"name": "null"}'
Error: Error in line 2: 'Domain' object has no attribute 'parse'

The syntax to call FormActions seems to be incorrect to me.
Replace it with
- brand_form
- form{"name":"brand_form"}
- form{"name":null}
notice null doesn't have parentheses.

Related

TypeError: from_pretrained() got an unexpected keyword argument 'file_name'

I'm trying to quantize a seq2seq model (M2M100) using optimum library provided by Huggingface. As per this guide, I'm trying to quantize the encoder and decoder one by one but that requires me to overwrite the model name. Following the documentation in the guide, I used the code:
encoder_quantizer = ORTQuantizer.from_pretrained(model_dir, file_name="encoder_model.onnx")
This code is throwing the following error:
TypeError: from_pretrained() got an unexpected keyword argument 'file_name'
I tried examining ORTQuantizer.from_pretrained and got the following:
<function optimum.onnxruntime.quantization.ORTQuantizer.from_pretrained(model_name_or_path: Union[str, os.PathLike], feature: str, opset: Optional[int] = None) -> 'ORTQuantizer'>
Clearly, from_pretrained here doesn't have a file_name parameter as has been indicated in the guide. Can someone please help me debug this error? Thanks!
Posting the solution I found while exploring optimum GitHub repo. The problem is that installing optimum via pip is downloading v1.3 which did not have the fix for quantizing seq2seq models. Instead install the package directly from GitHub using the command below. It worked fine afterwards.
python -m pip install git+https://github.com/huggingface/optimum.git

salt receipt for a pip install

I have an state in a salt receipt that fails to install some sources using pip. But using pip from the shell what I think is the equivalent works. So it isn't really the equivalent and there something I miss that I cannot see.
I like to mention at the very beginning that the minion doesn't have full internet access and it shouldn't have.
{% set PLUGINSSRC='/usr/local/src' %}
git_sardana-xaira:
git.latest:
- name: https://...
- target: {{ PLUGINSSRC }}/sardana_xaira
- rev: 0.0.1
pip_git_sardana-xaira:
pip.installed:
- onchanges:
- git: git_sardana-xaira
- target: {{ PLUGINSSRC }}/sardana_xaira
- bin_env: '/usr/bin/pip3'
- no_deps: True
- require:
- pkg: python3-pip
The reduced return of this is:
ID: pip_git_sardana-xaira
Function: pip.installed
Result: False
Comment: Failed to install packages: pip_git_sardana-xaira. Error: Collecting pip_git_sardana-xaira Exception:
(...)
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
(...)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f3b474fe400>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
(...)
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
But if, instead of use salt, I use the shell in the minion:
$ export PLUGINSSRC=/usr/local/src
$ sudo /usr/bin/pip3 install $PLUGINSSRC/sardana_xaira --no-deps
$ /usr/bin/pip3 list | grep xaira
sardana-xaira (0.0.1)
There would be something missing in the salt state that produces a different execution than the one in the shell. I also like to find which connection is failing when I use salt.
Following the documentation of the pip state there is a difference between name and target.
name
The name of the python package to install. You can also specify version numbers here using the standard operators ==, >=, <=. If requirements is given, this parameter will be ignored.
target
Install packages into target dir
The original receipt posted here was misunderstanding those two parameters.
The receipt that corresponds with the shell equivalent for pip would be:
pip_git_sardana-xaira:
pip.installed:
- onchanges:
- git: git_sardana-xaira
- name: {{ PLUGINSSRC }}/sardana_xaira
- bin_env: '/usr/bin/pip3'
- no_deps: True
- require:
- pkg: python3-pip

Can't use 'put'() to add data to hbase with happybase

My python version is 3.7, and after I ran pip3 install happybase, I started the command hbase thrift start and tried to write a brief .py file as following:
import happybase
connection = happybase.Connection('master')
table = connection.table('jmlr') #'jmlr' is a table in hbase
for i in table.scan():
print(i)
table.put('001', {'title':'dasds'}) #error here
connection.close()
When it's about to run table.put(), it reported such an error:
thriftpy2.transport.base.TTransportException: TTransportException(type=4, message='TSocket read 0 bytes')
And at the same time, the thrift reported an error:
ERROR [thrift-worker-1] thrift.TBoundedThreadPoolServer: Error occurred during processing of message. java.lang.IllegalArgumentException: Invalid famAndQf provided.
But just now I ran this python file again, it gave me a different error in thrift:
thrift.TBoundedThreadPoolServer: Thrift error occurred during processing of message.
org.apache.thrift.protocol.TProtocolException: Bad version in readMessageBegin
I have tried to add parameters like protocol='compact', transport='framed', but this didn't work, even the table.scan() failed.
Everything in the hbase shell is OK, so I can't figure out what went wrong, I'm about to collapse.
I ran into the same issue and found this sollution. You need to add even empty Column Qualifier ( ':' symbol as delimiter between Column Family and Column Qualifier) into put() method:
table.put('001:', {'title':'dasds'})
Also, you have a different error message after second run of script because thrift server is already failed.
I hope it will help you.

'rasa shell' giving error after successful execution of 'rasa train'

I have trained the rasa model and when I do rasa shell it shows
2020-04-04 11:57:26 ERROR rasa.core.actions.action - Couldn't create message for template 'utter_greet'.
this error. And for actions it is showing
2020-04-04 11:58:27 ERROR rasa_sdk.endpoint - Failed to extract slot job_function with action sales_form
this error.
Please help me in fixing this error. Any help will be highly appreciated.
This issue got fixed when I replaced 'templates' with 'responses' in domain.yml file. I am using rasa 2.0 version. This should work from rasa version 1.7 onwards

Doctrine 2 cli - Command Line Tool - Unexpected character in input - Generate entities

I am having a problem with running commands via cli doctrine-cli.php file. I am using Doctrine 2 and Codeigniter 2. I would like to generate entities via Command Line Tool, but without success. Page is hosted by Hostgator. On this server is installed by default PHP version 5.2, but you can use PHP version 5.3 by adding some commands to .htaccess file located in root.
In the Command Line Tool I get this error:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/tig3rb0y/public_html/naselsi/application/doctrine-cli.php on line 10
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/tig3rb0y/public_html/naselsi/application/doctrine-cli.php on line 10
Parse error: syntax error, unexpected T_STRING in /home/tig3rb0y/public_html/naselsi/application/doctrine-cli.php on line 10
If I run a file with PHP version via url, I get PHP version 5.3, but if I run the same file via Command Line Tool, I get php version 5.2. Why is that so?
Is there any solution for that?
Regards, Mario
I have a solution. As already #KeesSchepers said, there was a problem that in command line there was default 5.2.17 PHP version. I solved that simply, I just added prefix /opt/php53/bin/php to all doctrine2 commands, example:
/opt/php53/bin/php doctrine-cli.php orm:...
Thank you guys!

Resources