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

Improvements for 0.2.2 #12

Open
wants to merge 33 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
941d8de
Change conditions to validate constraint
vprokopets Mar 21, 2023
a954162
Fix typos, add zero fcard initialization
vprokopets Mar 28, 2023
cd667bf
More fix
vprokopets Mar 28, 2023
950c43e
Fix performance of cardinalities check
vprokopets Mar 29, 2023
60a364a
Function descr
vprokopets Mar 29, 2023
d6bc912
Merge branch 'bugfix' of https://github.com/vprokopets/WFML into bugfix
vprokopets Apr 6, 2023
634d965
fix naming problem
vprokopets Apr 6, 2023
27ce53a
bugfix
Feb 9, 2024
467a859
recursive parents, card constr fix
Feb 14, 2024
50ec586
gitignore check
Feb 14, 2024
2905d5d
upd Selenium
Feb 14, 2024
eaadff5
fix comparison
Feb 14, 2024
05ebf7e
req excl
Feb 14, 2024
99c1d84
fcard
Feb 19, 2024
e794b38
new core
Apr 22, 2024
1441707
handling parentheses + initial steps for feature product generation
May 24, 2024
0dd265c
Update requirements
May 24, 2024
b3d6d25
try to fix false constraint execution
Jun 6, 2024
8e256ec
try to fix unique x in y constraint
Jun 6, 2024
bbecd01
show metadata about constraint violated
Jun 10, 2024
18f2482
rm parent-constraint dependencies from grouping
Jun 10, 2024
5537c24
childs + skeleton for fast backtracking
Jun 11, 2024
7edeb4d
forgotten keyword
Jun 12, 2024
55cb907
allow mappings for assign-fcard
Jun 12, 2024
1ee6c36
validation pipeline + or-group bugfix
Jun 12, 2024
d0149be
correct handling of childs keyword for constraints
Jun 13, 2024
a93ab82
save_last_changes
Jul 15, 2024
e4f6a33
upd last changes
Jul 19, 2024
4b15083
manual type conversion fix
Sep 16, 2024
f67a576
Delete .DS_Store
vprokopets Sep 16, 2024
52ccb5c
views.py array transformation refactoring
Sep 23, 2024
3c75d2e
Merge branch 'bugfix' of https://github.com/vprokopets/WFML into bugfix
Sep 23, 2024
cfcf879
Exception error message improvement
Oct 9, 2024
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
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ local_settings.py
db.sqlite3
db.sqlite3-journal

# Mac
.DS_Store

# Flask stuff:
instance/
.webassets-cache
Expand Down Expand Up @@ -128,5 +131,5 @@ dmypy.json
# Pyre type checker
.pyre/

# Outputs
core/output/
# Output folder
/core/output/**
439 changes: 439 additions & 0 deletions core/backup/views.py

Large diffs are not rendered by default.

1,458 changes: 808 additions & 650 deletions core/backup/waffle_backup.py

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions core/examples/abstr_inh.wfl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
abstract a {
b -> integer
[b > 2]
}

abstract b: a {
c -> integer
[c > 2]
}

d : b
137 changes: 13 additions & 124 deletions core/examples/brise.wfl
Original file line number Diff line number Diff line change
@@ -1,133 +1,22 @@
SamplingStrategy {
Region -> string
Strategy {
abstract Region {
sa: SamplingStrategy
}

abstract SamplingStrategy {
RegionID -> string
test -> integer
xor Strategy {
Sobol
MersenneTwister
}
[Region in Context.ExperimentRegions.Regions]
[size Context.ExperimentRegions.Regions == size unique 'Region' at self]
}

// -------------------------Parameters---------------------------
abstract Hyperparameter {
Type -> predefined
Region -> predefined
[Region = TopLevel]
[if parent.Type == "Category" then Region = fname.parent else Region = parent.Region]
}

abstract Category {
Type -> predefined
Region -> predefined
[Type = "Category"]
[Region = parent.Region]
}

abstract ParentCategoricalHyperparameter : Hyperparameter {
Categories -> predefined
Default -> string
[Default in Categories]
[Type = "ParentCategoricalHyperparameter"]
[Categories = (filter childs.self where Type == "Category")]
}

abstract CategoricalHyperparameter : Hyperparameter {
Categories -> predefined
Default -> string
[Default in Categories]
}

abstract NominalHyperparameter: CategoricalHyperparameter {
[Type = "NominalHyperparameter"]
}

abstract OrdinalHyperparameter: CategoricalHyperparameter {
[Type = "OrdinalHyperparameter"]
}

abstract NumericHyperparameter: Hyperparameter

abstract FloatHyperparameter: NumericHyperparameter {
Lower -> float
Upper -> float
Default -> float
[Default >= Lower]
[Default <= Upper]
[Type = "FloatHyperparameter"]
}

abstract IntegerHyperparameter: NumericHyperparameter {
Lower -> integer
Upper -> integer
Default -> integer
[Default >= Lower]
[Default <= Upper]
[Type = "IntegerHyperparameter"]
}
abstract Objective{
Name -> predefined
DataType -> predefined
Minimization -> predefined
MinExpectedValue -> predefined
MaxExpectedValue -> predefined
[test > 2]
[RegionID in Context.ExperimentRegions.Regionss]
}

Context {
Experiment {
Title -> predefined
[Title = 'EnergyConsumption']
TaskConfiguration {
TaskName -> predefined
[TaskName = 'energy_consumption']
MaxTimeToRunTask -> predefined
[MaxTimeToRunTask = 10]

Scenario {
FromFile {
WsFile -> predefined
[WsFile = 'search_space_96/Radix-500mio_full.csv']
}
}
Objectives {
Energy : Objective {
[Name = "energy"]
[DataType = float]
[Minimization = true]
[MinExpectedValue = 0]
[MaxExpectedValue = 150000.0]
}
Time : Objective {
[Name = "time"]
[DataType = float]
[Minimization = true]
[MinExpectedValue = 0]
[MaxExpectedValue = 150000.0]
}
}
}

SearchSpace {
Type -> predefined
Region -> predefined
[Type = "SearchSpace"]
[Region = "TopLevel"]

LLH: ParentCategoricalHyperparameter {
jMetalPy_SA: Category {
parameter: IntegerHyperparameter
}
jMetal_ES: Category {
parameter: IntegerHyperparameter
}
jMetalPy_ES: Category {
parameter: IntegerHyperparameter
}
}
}
}
ExperimentRegions {
Regions -> predefined
[Regions = unique Region at Context.Experiment.SearchSpace]
[fcard.SamplingStrategy = size Regions]
Regionss -> array
[fcard.Regions = size Regionss]
Regions: Region
}
}
22 changes: 6 additions & 16 deletions core/examples/complex_card_constraint.wfl
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
a 2..3 {
xor b 2..3 {
c 2..3 {
d -> integer
}
e 2..3 {
b -> integer 2..3
c -> integer
[c > b]
}
}
xor b 2..3 {
e 2..3 {
b -> integer 2..3
c -> integer
[c > b]
}
}

b 2..3 {
c -> integer 2..3
[c > 2]
}
4 changes: 2 additions & 2 deletions core/examples/empty_fields.wfl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ a {
[b = 2]
[b > 1]
}
a1 2..3 {
d 2..3 {
b -> predefined
[b = 3]
[b > 2]
}
a2 2..3 {
f 2..3 {
a -> integer
b -> predefined
[a > 2]
Expand Down
10 changes: 10 additions & 0 deletions core/examples/feature_analysis copy.wfl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
a {
b {
c -> integer
[c > 2]
}
d {
e -> integer
[e < 2]
}
}
File renamed without changes.
13 changes: 1 addition & 12 deletions core/examples/filter_gcard_by_constraint.wfl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Model 3 {
Model 2 {
xor SurrogateType {
Single
Compositional
Expand All @@ -13,20 +13,9 @@ Model 3 {
Type -> predefined
[Type = "GaussianProcessRegressor"]
}
[if gcard.parent.SurrogateType == "Compositional" then size childs.Context.Objectives == size childs.self]

}
[if gcard.self.SurrogateType == "Single" then gcard.self.Surrogate = 'xor']
[if gcard.self.SurrogateType == "Single" then fcard.self.Surrogate.GaussianProcessRegressor = 1]
[if gcard.self.SurrogateType == "Single" then fcard.self.Surrogate.LinearRegression = 1]
[if gcard.self.SurrogateType == "Compositional" then gcard.self.Surrogate = 'or']
[if gcard.self.SurrogateType == "Portfolio" then gcard.self.Surrogate = 'or']
}

Context {
Objectives {
Objective 1..3 {
test -> integer
}
}
}
107 changes: 93 additions & 14 deletions core/examples/reference.wfl
Original file line number Diff line number Diff line change
@@ -1,20 +1,99 @@
abstract A {
a -> integer
[a > 1]
// ----------------------Abstract features-----------------------

abstract Hyperparameter {
Type -> predefined
Level -> integer
[if gcard.Context.SearchSpace.Structure == Flat then Level == 0]
}

abstract Category {
Type -> predefined
[Type = "Category"]
}

abstract CategoricalHyperparameter : Hyperparameter {
Categories -> predefined
Default -> string
[Default in Categories]
[Categories = (filter self.childs where Type == "Category")]
}

abstract NominalHyperparameter: CategoricalHyperparameter {
[Type = "NominalHyperparameter"]
}
abstract OrdinalHyperparameter: CategoricalHyperparameter {
[Type = "OrdinalHyperparameter"]
}
abstract B : A {
b -> integer
[b > 2]

abstract NumericHyperparameter: Hyperparameter

abstract FloatHyperparameter: NumericHyperparameter {
Lower -> float
Upper -> float
Default -> float
[Default >= Lower]
[Default <= Upper]
[Type = "FloatHyperparameter"]
[fcard.StopCondition.Instance.AdaptiveSC = 0]
}
abstract C : A {
c -> integer
[c > 3]
abstract IntegerHyperparameter: NumericHyperparameter {
Lower -> integer
Upper -> integer
Default -> integer
[Default >= Lower]
[Default <= Upper]
[Type = "IntegerHyperparameter"]
}

abstract D {
d -> integer
[d > 4]
abstract Objective {
Name -> predefined
DataType -> predefined
Minimization -> predefined
MinExpectedValue -> predefined
MaxExpectedValue -> predefined
}
abstract SC {
Type -> predefined
Name -> string
}
F: D {
xor E ->> A
// ------------------------Context Model------------------------
Context {
TaskConfiguration {
TaskName -> predefined
[TaskName = "test"]
MaxTimeToRunTask -> integer
TimeUnit -> string
[TimeUnit in {"seconds", "minutes", "hours", "days"}]
Scenario
Objectives {
// objectives
Y1 : Objective {
[Name = "Y1"]
[DataType = "float"]
[Minimization = true]
[MinExpectedValue = 0]
[MaxExpectedValue = 100]
}
/*
Y2 : Objective {
[Name = "Y2"]
[DataType = "float"]
[Minimization = true]
[MinExpectedValue = 0]
[MaxExpectedValue = 100]
}
*/
}
}

SearchSpace {
// parameters
X1 : FloatHyperparameter
X2 : IntegerHyperparameter
xor Structure {
Flat
Hierarchical
}
[fcard.ConfigurationSelection.Predictor.Model = size unique Level at self]
}
}
9 changes: 9 additions & 0 deletions core/examples/stage_rollback.wfl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
X {
A ? {
[self requires X.E.G]
[self excludes X.E.G]
}
E ? {
G
}
}
Loading
Loading