You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2018. It is now read-only.
$ python start_mirt_pipeline.py --generate --train -n 2 --visualize
Generating Responses
Generated responses for 500 students and 10 problems
Training MIRT models
Starting main.{'training_set_size': 1.0, 'regularization': 1e-05, 'emit_features': False, 'resume_from_file': '', 'max_pass_lbfgs': 5, 'sampling_num_steps': 200, 'workers': 1, 'num_epochs': 2, 'data_format': 'simple', 'sampling_epsilon': 0.2, 'num_replicas': 1, 'file': '/Users/bruno/Development/MachineLearning/guacamole/sample_data/models/train.responses', 'time': False, 'output': '/Users/bruno/Development/MachineLearning/guacamole/sample_data/models/1_no_time_2014-12-13 08:59:30.905104/', 'num_abilities': 1, 'max_time_taken': 1000.0}
loading dataTraining dataset, 436 students
10 exercises
epoch 0, Traceback (most recent call last):
File "start_mirt_pipeline.py", line 263, in
main()
File "start_mirt_pipeline.py", line 173, in main
run_with_arguments(arguments)
File "start_mirt_pipeline.py", line 237, in run_with_arguments
generate_model_with_parameters(arguments)
File "start_mirt_pipeline.py", line 205, in generate_model_with_parameters
mirt_train_EM.run_programmatically(mirt_train_params)
File "/Users/bruno/Development/MachineLearning/guacamole/mirt/mirt_train_EM.py", line 166, in run_programmatically
run(options)
File "/Users/bruno/Development/MachineLearning/guacamole/mirt/mirt_train_EM.py", line 249, in run
model.run_em_step(epoch)
File "/Users/bruno/Development/MachineLearning/guacamole/mirt/mirt_util.py", line 516, in run_em_step
results = self.get_sampling_results()
File "/Users/bruno/Development/MachineLearning/guacamole/mirt/mirt_util.py", line 496, in get_sampling_results
for ind in range(len(self.user_states))]
File "/Users/bruno/Development/MachineLearning/guacamole/mirt/mirt_util.py", line 260, in sample_abilities_diffusion_wrapper
np.random.seed([time.time() * 1e9])
File "mtrand.pyx", line 652, in mtrand.RandomState.seed (numpy/random/mtrand/mtrand.c:7775)
TypeError: Cannot cast array from dtype('float64') to dtype('int64') according to the rule 'safe'
I'm running in a MacOS 10.9.5, my pip freeze for the env for this project:
@brunojm Did you get an answer to this? I am also stuck at the same error.
"TypeError: Cannot cast array from dtype('float64') to dtype('int64') according to the rule 'safe'"
This is because numpy.random.seed()'s input seed must be convertable to 32 bit unsigned integers.
Change the code in mirt/mirt_util.py starting from line 257 to the following code fixes this
I'm getting:
$ python start_mirt_pipeline.py --generate --train -n 2 --visualize
Generating Responses
Generated responses for 500 students and 10 problems
Training MIRT models
Starting main.{'training_set_size': 1.0, 'regularization': 1e-05, 'emit_features': False, 'resume_from_file': '', 'max_pass_lbfgs': 5, 'sampling_num_steps': 200, 'workers': 1, 'num_epochs': 2, 'data_format': 'simple', 'sampling_epsilon': 0.2, 'num_replicas': 1, 'file': '/Users/bruno/Development/MachineLearning/guacamole/sample_data/models/train.responses', 'time': False, 'output': '/Users/bruno/Development/MachineLearning/guacamole/sample_data/models/1_no_time_2014-12-13 08:59:30.905104/', 'num_abilities': 1, 'max_time_taken': 1000.0}
loading dataTraining dataset, 436 students
10 exercises
epoch 0, Traceback (most recent call last):
File "start_mirt_pipeline.py", line 263, in
main()
File "start_mirt_pipeline.py", line 173, in main
run_with_arguments(arguments)
File "start_mirt_pipeline.py", line 237, in run_with_arguments
generate_model_with_parameters(arguments)
File "start_mirt_pipeline.py", line 205, in generate_model_with_parameters
mirt_train_EM.run_programmatically(mirt_train_params)
File "/Users/bruno/Development/MachineLearning/guacamole/mirt/mirt_train_EM.py", line 166, in run_programmatically
run(options)
File "/Users/bruno/Development/MachineLearning/guacamole/mirt/mirt_train_EM.py", line 249, in run
model.run_em_step(epoch)
File "/Users/bruno/Development/MachineLearning/guacamole/mirt/mirt_util.py", line 516, in run_em_step
results = self.get_sampling_results()
File "/Users/bruno/Development/MachineLearning/guacamole/mirt/mirt_util.py", line 496, in get_sampling_results
for ind in range(len(self.user_states))]
File "/Users/bruno/Development/MachineLearning/guacamole/mirt/mirt_util.py", line 260, in sample_abilities_diffusion_wrapper
np.random.seed([time.time() * 1e9])
File "mtrand.pyx", line 652, in mtrand.RandomState.seed (numpy/random/mtrand/mtrand.c:7775)
TypeError: Cannot cast array from dtype('float64') to dtype('int64') according to the rule 'safe'
I'm running in a MacOS 10.9.5, my pip freeze for the env for this project:
affinity==0.1.0
matplotlib==1.4.2
mock==1.0.1
nose==1.3.4
numpy==1.9.1
pyparsing==2.0.3
python-dateutil==2.3
pytz==2014.10
scipy==0.14.0
six==1.8.0
wsgiref==0.1.2
The text was updated successfully, but these errors were encountered: