Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(unsuccessfully) attempting to remove the Collate field #473

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -37,51 +37,6 @@ SystemRequirements: Python (>= 2.7.0) with header files and shared library;
Encoding: UTF-8
Depends:
R (>= 3.1.0)
Collate:
'package.R'
'utils.R'
'greta_mcmc_list.R'
'tf_functions.R'
'overloaded.R'
'node_class.R'
'node_types.R'
'variable.R'
'probability_distributions.R'
'mixture.R'
'joint.R'
'unknowns_class.R'
'greta_array_class.R'
'as_data.R'
'distribution.R'
'operators.R'
'functions.R'
'transforms.R'
'structures.R'
'extract_replace_combine.R'
'dag_class.R'
'greta_model_class.R'
'progress_bar.R'
'inference_class.R'
'samplers.R'
'optimisers.R'
'inference.R'
'install_tensorflow.R'
'calculate.R'
'callbacks.R'
'simulate.R'
'chol2symm.R'
'install_greta_deps.R'
'conda_greta_env.R'
'greta_stash.R'
'greta_create_conda_env.R'
'greta_install_miniconda.R'
'greta_install_python_deps.R'
'new_install_process.R'
'reinstallers.R'
'checkers.R'
'test_if_forked_cluster.R'
'zzz.R'
'internals.R'
Imports:
abind,
callr,
Expand Down
32 changes: 32 additions & 0 deletions R/aaa-.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# create an object stash in greta's namespace, to return traces to the user when
# they abort a run
greta_stash <- new.env()
greta_stash$python_has_been_initialised <- FALSE
greta_stash$numerical_messages <- c(
"is not invertible",
"Cholesky decomposition was not successful"
)

# create a named list
module <- function(..., sort = TRUE) {
dots <- list(...)
names <- names(dots)

# guess names from call
cl <- match.call()
nm <- as.character(as.list(cl)[-1])

if (is.null(names)) {
names(dots) <- nm
} else {
blank_names <- names == ""
names[blank_names] <- nm[blank_names]
names(dots) <- names
}

if (sort) {
dots <- dots[order(names(dots))]
}

dots
}
10 changes: 0 additions & 10 deletions R/inference.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
#' MCMC or likelihood/posterior optimisation.
NULL


# create an object stash in greta's namespace, to return traces to the user when
# they abort a run
greta_stash <- new.env()
greta_stash$python_has_been_initialised <- FALSE
greta_stash$numerical_messages <- c(
"is not invertible",
"Cholesky decomposition was not successful"
)

#' @rdname inference
#' @export
#' @importFrom stats rnorm runif
Expand Down
24 changes: 0 additions & 24 deletions R/utils.R
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
# utility functions

# create a named list
module <- function(..., sort = TRUE) {
dots <- list(...)
names <- names(dots)

# guess names from call
cl <- match.call()
nm <- as.character(as.list(cl)[-1])

if (is.null(names)) {
names(dots) <- nm
} else {
blank_names <- names == ""
names[blank_names] <- nm[blank_names]
names(dots) <- names
}

if (sort) {
dots <- dots[order(names(dots))]
}

dots
}

# find out whether the usr has conda installed and visible
#' @importFrom reticulate conda_binary
have_conda <- function() {
Expand Down