Skip to content

Commit

Permalink
refactor: remove some unused constants
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Nov 4, 2024
1 parent 1fcd544 commit f75f1ee
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/Core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ include("OptionsStruct.jl")
include("Operators.jl")
include("Options.jl")

using .ProgramConstantsModule:
MAX_DEGREE, BATCH_DIM, FEATURE_DIM, RecordType, DATA_TYPE, LOSS_TYPE
using .ProgramConstantsModule: RecordType, DATA_TYPE, LOSS_TYPE
using .DatasetModule: Dataset, is_weighted, has_units, max_features
using .MutationWeightsModule: AbstractMutationWeights, MutationWeights, sample_mutation
using .OptionsStructModule:
Expand Down
6 changes: 3 additions & 3 deletions src/Dataset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module DatasetModule
using DynamicQuantities: Quantity

using ..UtilsModule: subscriptify, get_base_type
using ..ProgramConstantsModule: BATCH_DIM, FEATURE_DIM, DATA_TYPE, LOSS_TYPE
using ..ProgramConstantsModule: DATA_TYPE, LOSS_TYPE
using ...InterfaceDynamicQuantitiesModule: get_si_units, get_sym_units

"""
Expand Down Expand Up @@ -125,8 +125,8 @@ function Dataset(
)
end

n = size(X, BATCH_DIM)
nfeatures = size(X, FEATURE_DIM)
n = size(X, 2)
nfeatures = size(X, 1)
variable_names = @something(variable_names, ["x$(i)" for i in 1:nfeatures])
display_variable_names = @something(
display_variable_names, ["x$(subscriptify(i))" for i in 1:nfeatures]
Expand Down
3 changes: 0 additions & 3 deletions src/ProgramConstants.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
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
3 changes: 0 additions & 3 deletions src/SymbolicRegression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,6 @@ using DispatchDoctor: @stable
end

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

0 comments on commit f75f1ee

Please sign in to comment.