Comments (11)
Also:
Traceback (most recent call last):
File "/home/gereon/Develop/BEASTling/beastling/cli.py", line 136, in do_generate
xml = BeastXml(config)
File "/home/gereon/Develop/BEASTling/beastling/beastxml.py", line 65, in __init__
self.build_xml()
File "/home/gereon/Develop/BEASTling/beastling/beastxml.py", line 97, in build_xml
self.add_run()
File "/home/gereon/Develop/BEASTling/beastling/beastxml.py", line 163, in add_run
self.add_operators()
File "/home/gereon/Develop/BEASTling/beastling/beastxml.py", line 358, in add_operators
model.add_operators(self.run)
File "/home/gereon/Develop/BEASTling/beastling/models/binary.py", line 249, in add_operators
BaseModel.add_operators(self, run)
File "/home/gereon/Develop/BEASTling/beastling/models/basemodel.py", line 683, in add_operators
self.add_frequency_operators(run)
File "/home/gereon/Develop/BEASTling/beastling/models/binary.py", line 260, in add_frequency_operators
for name in self.parameter_identifiers():
AttributeError: 'BinaryModel' object has no attribute 'parameter_identifiers'
from beastling.
Hmm, it's the base class for the Covarion model, right? I use that regularly and have not encountered any problems. But maybe I'm just not exercising it in the right way...
from beastling.
There's also a binary model in its own right, I just tried to run a binary non-covarion model and got this.
from beastling.
The CTMC model? That's another subclass of this, though, right?
from beastling.
Hum. That is very strange indeed. I just typed binary
, not binaryctmc
.
According to https://github.com/lmaurits/BEASTling/blob/master/beastling/configuration.py#L739-L765, I would expect that to throw a ValueError("Unknown model type 'binary' for model section 'vocabulary', and failed to import a third-party model.")
That means, I need to have a closer look on what exactly is going on under the hood. I hate rabbit holes.
from beastling.
Maybe there's a file binary.py
in your cwd
? See
BEASTling/beastling/configuration.py
Lines 755 to 763 in ba26491
from beastling.
I expect config["model"] == 'binary'
, so config["model"].rsplit(".",1) == ['binary']
, so ValueError: not enough values to unpack (expected 2, got 1)
to be caught and replaced by ValueError("Unknown model type 'binary' for model section 'vocabulary', and failed to import a third-party model.")
(That bare except
is not nice, though.)
from beastling.
Ah, ok. I see. Looks like you are in for a couple of print
s.
from beastling.
Yep, that should probably just be except ImportError
. Maybe the else
at 755 should be elif config["model"].endswith(".py")
if that's how we want to signal an attempt to use an external model?
from beastling.
As I read it, the code we have looks reasonable, and the errors I expect are ValueError
(like in my case) and ImportError
(mistyped some module name). No need to have a '.py' in the string.
It's probably something dumb on my end. I'll drop some breakpoint()
s and print()
s this evening.
from beastling.
Argh, sorry, you're right, I quickly misread that split
as operating on a filename to remove the extension, not separating a module and class.
from beastling.
Related Issues (20)
- CLDF dataset loading pains HOT 19
- "The Yule model is not particularly suitable for linguistic analyses, however it is currently the best BEAST has to offer." HOT 7
- ASR tests fail HOT 33
- log_params duplicates log entries. HOT 1
- Refactor beastrun tests? HOT 6
- Unify file handling HOT 2
- Remove the dependency on clldutils HOT 2
- Remaining synonym issues
- Hack BEAST XML using DOM notation? HOT 2
- OSError: File name too long, instead of being interpreted as list HOT 1
- Make TreePrior.add_state_nodes use state instead of beastxml
- LogNormal Relaxed Clock parameterized by “variance”, is actually “stdev in log space”
- PyYAML, an indirect dependency, needs Python>3.4 HOT 4
- Document and Unify Exit Codes
- Should base-clocks/models/priors be abstract?
- Report could use slightly more clever templating
- Should __distribution__ be a property of all clocks?
- Binary CTMC binarised=True
- BEASTling does not clean up concept names with commas properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beastling.