I am using LibSVM and I used GRID.py for SVM. But the problem is I ran it grid.py more than hour but it's not giving any output. The error message it gives as follows
%%%%%%%%%%%%%%%%%%%%%%%
Traceback (most recent call last):
File "grid.py", line 266, in run
if rate is None: raise RuntimeError('get no rate')
RuntimeError: get no rate
worker local quit.
%%%%%%%%%%%%%%%
Can anybody tell me what's problem? And what is this "worker local quit"?
If anybody want to know more information about implementation or GRID.py please feel free to ask. I am having more than 9000 rows with 8 different columns as dataset
Are you calling GRID.py with either the parameter -log2c or -log2g?
It seems that the problem arises when LocalWorker.run_one returns None.
Related
I am trying to understand a traceback error that I am receiving. See below.
Traceback (most recent call last):
File "test.py", line 291, in test_cache_in_function
self.assertTrue("sunset" in testfilestr,"Testing that the sunset request was cached")
AssertionError: Testing that the sunset request was cached
Does the above error mean that "sunset" should not be in the cached file?
A point about nomenclature. You are getting a AssertionError. The error is printed along with the traceback, which indicates the sequence of calls that led to that error.
In your particular case, it looks like the error is caused because the assertion made by self.assertTrue(...) came out False. You are asserting that the string "sunset" is in testfilestr, but it is not. Probably because it is in the cache file instead.
The second argument to assertTrue is a message, which you see as the message to the AssertionError. This argument is optional, and is usually used to clarify the error beyond the obvious default message, which would be something to the effect of "sunset" in testfilestr is False, expected True.
I am trying to simulate a repeat-until loop in Theano:
def method_a(arguments):
...
return result, theano.scan.until(t.eq(a,b))
I encountered the following strange behaviour. Let b be a constant. Whenever a is a constant, everything works fine. However, when a is a scalar, I get an error related to optimisation:
ERROR (theano.gof.opt): SeqOptimizer apply <theano.gof.opt.EquilibriumOptimizer object at 0x110d0d8d0>
ERROR (theano.gof.opt): Traceback:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "[...]/lib/python2.7/site-packages/theano/gof/opt.py", line 196, in apply
sub_prof = optimizer.optimize(fgraph)
File "[...]/python2.7/site-packages/theano/gof/opt.py", line 82, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "[...]/python2.7/site-packages/theano/gof/opt.py", line 1665, in apply
gopt.apply(fgraph)
File "[...]/python2.7/site-packages/theano/scan_module/scan_opt.py", line 1300, in apply
if self.belongs_to_set(nd, subset):
File "[...]/python2.7/site-packages/theano/scan_module/scan_opt.py", line 1286, in belongs_to_set
rep.op.inputs)
File "[...]/python2.7/site-packages/theano/scan_module/scan_utils.py", line 452, in equal_computations
dx.type.dtype == dy.type.dtype and
AttributeError: 'NoneTypeT' object has no attribute 'dtype'
I'd appreciate if someone could help me understand the error. I'm assuming the AttributeError doesn't refer to a or b, because I can print their dtype and see that they do have one. Other than that, I can't make any sense out of it.
[Edit] This is not a fatal error. The code runs normally and the process finishes with exit code 0. It looks like Theano is trying to optimise the graph and fails to do so, which doesn't really impact the program.
The traceback indicate that in the function equal_compuations(), we didn't cover all case, when doing some comparison.
I have a PR with a fix for it here:
https://github.com/Theano/Theano/pull/1928
thanks for the report.
Your [edit] section, indicate me that you cut some of the errors message. If this happear during optimization with a warning, it mean an optimization was just skipped. It is possible that the optimization just don't apply, but it could be possible that with the fix, now the optimization apply. If that is the case, there could be some speed up with the fix.
Pandas is not working properly on my system, and I am trying to fix it. Below is the output I got running nosetests pandas (all output available here); do you have any suggestion on how to fix this?
======================================================================
FAIL: test_fred_parts (pandas.io.tests.test_data.TestFred)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/Alberto/anaconda/lib/python2.7/site-packages/pandas/util/testing.py", line 1135, in wrapper
return t(*args, **kwargs)
File "/Users/Alberto/anaconda/lib/python2.7/site-packages/pandas/io/tests/test_data.py", line 424, in test_fred_parts
self.assertEqual(df.ix['2010-05-01'][0], 217.23)
AssertionError: 217.29900000000001 != 217.23
----------------------------------------------------------------------
Ran 4836 tests in 377.165s
FAILED (SKIP=88, failures=2)
This particular test is an "allowable failure" in the pandas network tests (it's decorated as network and I think may have even had to change recently in master to make it less sensitive). Data is grabbed from FRED and parsed and tested against what pandas has queried previously...
Sometimes network tests fails intermittently, it may be that the API has changed, the connection is down, or the numbers have been changed slightly (which from the assertion message looks to be the case here).
This is nothing to worry about, as you can see the other 4836 pass! :)
Basically, I want to read the CPU temperature with Python. Please explain in layman's terms as I have never done this on Windows before nor have I had to work with wmi.
This is what I have at the moment:
import wmi
w = wmi.WMI(namespace="root\wmi")
temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
print temperature_info.CurrentTemperature
(I got this code from this thread: Accessing CPU temperature in python)
However, on running the script, I get this error:
Traceback (most recent call last):
File "C:\Users\Ryan\Desktop\SerialSystemMonitor", line 4, in <module>
temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
File "C:\Python27\lib\site-packages\wmi.py", line 819, in query
handle_com_error ()
File "C:\Python27\lib\site-packages\wmi.py", line 241, in handle_com_error
raise klass (com_error=err)
x_wmi: <x_wmi: Unexpected COM Error (-2147217396, 'OLE error 0x8004100c', None, None)>
What can I do to get this to work?
According to the MSDN page on WMI Error Constants, the error you have received is:
WBEM_E_NOT_SUPPORTED
2147749900 (0x8004100C)
Feature or operation is not supported.
Presumably, then, your CPU does not provide temperature information through WMI. If your CPU doesn't expose this information, you're probably out of luck, at least as far as a straightforward solution in Python goes.
I assume you've tried the other option given in the answer you linked, using Win32_TemperatureProbe(); if you haven't, try it.
Just execute as Admin. It's work for me.
I'm trying to get the sample and other sample codes i find for pyuno running with openoffice 3.1.1 and python 2.5 with no luck.
Unfortunately, pyuno does not give any clues about what goes wrong.
In [1]: import uno
In [2]: local = uno.getComponentContext()
In [3]: resolver = local.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", local)
---------------------------------------------------------------------------
com.sun.star.uno.RuntimeException Traceback (most recent call last)
/opt/openoffice.org/basis3.1/program/ in ()
com.sun.star.uno.RuntimeException: : 'tuple' object has no attribute 'getTypes', traceback follows
no traceback available
below is the output of execution of /opt/openoffice.org/basis3.1/program/officehelper.py
which basically boots the headless office instance and returns a related context object.
den#ev:/opt/openoffice.org/basis3.1/program > python officehelper.py
Traceback (most recent call last):
File "officehelper.py", line 42, in
from com.sun.star.connection import NoConnectException
File "uno.py", line 273, in _uno_import
RuntimeException = pyuno.getClass( "com.sun.star.uno.RuntimeException" )
RuntimeError: pyuno.getClass: expecting one string argument
pyuno takes only 1 argument and it hasto be a string, as defined in http://udk.openoffice.org/source/browse/udk/pyuno/source/module/pyuno_module.cxx?rev=1.14&view=markup
i could not manage to get pyuno.getClass work anyway.
any suggestions about how to get pyuno working?
In [1]: import uno
In [2]: local = uno.getComponentContext()
In [3]: resolver = local.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", local)
OOP gone wrong, imho. i know its OT, but i tried getting uno to work before, and gave up. this is pure Steve Yegge Prose (read up on http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html).
when you translate those lines into a more speakable form, they come out roughly as:
"Let 'local' be the result of calling method 'get component context' of 'uno'. Let the 'service manager' be the attribute 'service manager' of 'local'. Let 'resolver' be the result of calling the 'service manager' method 'create instance with context', using arguments 'com sun star bridge uno url resolver' and 'local'."
omg. no surprise something is wrong with a program that is so atrociously over-specific, convoluted, and self-referential while being not self-aware... you call a sub-method of 'local' and that sub-method has to be told what 'local' means? say what? hats off to the fearless developers who can cut through this. happy debugging.
ADDED:
thx for comment and points.
the pyuno problem i cannot do anything about in fact, but i encourage to persue a patient trytrytry approach with a clear deadline.
i also suggest to file an outright B.U.G. with the pyuno people (if they are in fact active—i got the impression that this was a rather silent project) because of the nonsense error message: the method in question appears to request one string argument, and it gets one, and it complains it did. this is so not helpful to the degree it becomes reasonable to declare a code fault.
in this kind of situation i often look into the sources. but you already did that, right?
i hate people to ask back ‘why do you want to do this?’ when i ask for help. however, sometimes someone (maybe you) does come up with another workable path in the process, one that does not include a solution to the particular problem, but helps to solve the superordinate one. so, if i may ask: what is the big picture?