Skip to content

Commit

Permalink
Remove unused BATCH_DIM, FEATURE_DIM
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Aug 13, 2023
1 parent 14a5670 commit 31b2787
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/Core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ include("OptionsStruct.jl")
include("Operators.jl")
include("Options.jl")

import .ProgramConstantsModule:
MAX_DEGREE, BATCH_DIM, FEATURE_DIM, RecordType, DATA_TYPE, LOSS_TYPE
import .ProgramConstantsModule: MAX_DEGREE, RecordType, DATA_TYPE, LOSS_TYPE
import .DatasetModule: Dataset
import .OptionsStructModule: Options, ComplexityMapping, MutationWeights, sample_mutation
import .OptionsModule: Options
Expand Down
6 changes: 3 additions & 3 deletions src/Dataset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import DynamicQuantities:
import ...InterfaceDynamicQuantitiesModule: get_si_units, get_sym_units

import ..UtilsModule: subscriptify
import ..ProgramConstantsModule: BATCH_DIM, FEATURE_DIM, DATA_TYPE, LOSS_TYPE
import ..ProgramConstantsModule: DATA_TYPE, LOSS_TYPE
#! format: off
import ...deprecate_varmap
#! format: on
Expand Down Expand Up @@ -120,8 +120,8 @@ function Dataset(
# Deprecation warning:
variable_names = deprecate_varmap(variable_names, varMap, :Dataset)

n = size(X, BATCH_DIM)
nfeatures = size(X, FEATURE_DIM)
n = size(X, 2)
nfeatures = size(X, 1)
weighted = weights !== nothing
variable_names = if variable_names === nothing
["x$(i)" for i in 1:nfeatures]
Expand Down
2 changes: 0 additions & 2 deletions src/ProgramConstants.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module ProgramConstantsModule

const MAX_DEGREE = 2
const BATCH_DIM = 2
const FEATURE_DIM = 1
const RecordType = Dict{String,Any}

const DATA_TYPE = Number
Expand Down
2 changes: 0 additions & 2 deletions src/SymbolicRegression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ include("SearchUtils.jl")

import .CoreModule:
MAX_DEGREE,
BATCH_DIM,
FEATURE_DIM,
DATA_TYPE,
LOSS_TYPE,
RecordType,
Expand Down

0 comments on commit 31b2787

Please sign in to comment.