FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
orbit/orbit/utils/set_cmdstan_path.py at dev · uber/orbit · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
uber
/
orbit
Public
Notifications
You must be signed in to change notification settings
Fork
148
Star
2.1k
Code
Issues
54
Pull requests
5
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
orbit
/
orbit
/
utils
/
set_cmdstan_path.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (21 loc) · 752 Bytes
Breadcrumbs
orbit
/
orbit
/
utils
/
set_cmdstan_path.py
Copy path
File metadata and controls
27 lines (21 loc) · 752 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import
json
from
pathlib
import
Path
import
cmdstanpy
from
..
utils
.
logger
import
get_logger
logger
=
get_logger
(
"orbit"
)
_ORBIT_DIR
=
Path
(
__file__
).
parent
.
parent
def
set_cmdstan_path
():
with
open
(
_ORBIT_DIR
/
"config.json"
)
as
f
:
config
=
json
.
load
(
f
)
CMDSTAN_VERSION
=
config
[
"CMDSTAN_VERSION"
]
local_cmdstan
=
_ORBIT_DIR
/
"stan_compiled"
/
f"cmdstan-
{
CMDSTAN_VERSION
}
"
if
local_cmdstan
.
exists
():
cmdstanpy
.
set_cmdstan_path
(
str
(
local_cmdstan
))
logger
.
debug
(
f"Local/repackaged cmdstan exists, setting path to
{
str
(
local_cmdstan
)
}
"
)
return
1
logger
.
debug
(
f"Cannot find local cmdstan in
{
str
(
local_cmdstan
)
}
, using default path at ~/.cmdstan."
)
return
1
Back
|
FazBrowse Home
|
New Git URL