Upgrading GEMSEO¶
This page contains the history of the breaking changes in GEMSEO. The codes using those shall be updated according to the target GEMSEO version.
5.0.0¶
End user API¶
The high-level functions defined in
gemseo.api
have been moved togemseo
.Features have been extracted from GEMSEO and are now available in the form of
plugins
:gemseo.algos.opt.lib_pdfo
has been moved to gemseo-pdfo, a GEMSEO plugin for the PDFO library,gemseo.algos.opt.lib_pseven
has been moved to gemseo-pseven, a GEMSEO plugin for the pSeven library,gemseo.wrappers.matlab
has been moved to gemseo-matlab, a GEMSEO plugin for MATLAB,gemseo.wrappers.template_grammar_editor
has been moved to gemseo-template-editor-gui, a GUI to create input and output file templates forDiscFromExe
.
Surrogate models¶
The high-level functions defined in
gemseo.mlearning.api
have been moved togemseo.mlearning
.stieltjes
andstrategy
are no longer arguments ofPCERegressor
.Rename
MLAlgo.save
toMLAlgo.to_pickle
.The name of the method to evaluate the quality measure is passed to
MLAlgoAssessor
with the argumentmeasure_evaluation_method
; any of ``[“LEARN”, “TEST”, “LOO”, “KFOLDS”, “BOOTSTRAP”].The name of the method to evaluate the quality measure is passed to
MLAlgoSelection
with the argumentmeasure_evaluation_method
; any of ``[“LEARN”, “TEST”, “LOO”, “KFOLDS”, “BOOTSTRAP”].The name of the method to evaluate the quality measure is passed to
MLAlgoCalibration
with the argumentmeasure_evaluation_method
; any of ``[“LEARN”, “TEST”, “LOO”, “KFOLDS”, “BOOTSTRAP”].The names of the methods to evaluate a quality measure can be accessed with
MLAlgoQualityMeasure.EvaluationMethod
. #464Rename
gemseo.mlearning.qual_measure
togemseo.mlearning.quality_measures
.Rename
gemseo.mlearning.qual_measure.silhouette
togemseo.mlearning.quality_measures.silhouette_measure
.Rename
gemseo.mlearning.cluster
togemseo.mlearning.clustering
.Rename
gemseo.mlearning.cluster.cluster
togemseo.mlearning.clustering.clustering
.Rename
gemseo.mlearning.transform
togemseo.mlearning.transformers
. #701The enumeration
RBFRegressor.Function
replaced the constants:RBFRegressor.MULTIQUADRIC
RBFRegressor.INVERSE_MULTIQUADRIC
RBFRegressor.GAUSSIAN
RBFRegressor.LINEAR
RBFRegressor.CUBIC
RBFRegressor.QUINTIC
RBFRegressor.THIN_PLATE
RBFRegressor.AVAILABLE_FUNCTIONS
Post processing¶
The visualization
Lines
uses a specific tuple (color, style, marker, name) per line by default. #677YvsX
no longer has the argumentsx_comp
andy_comp
; the components have to be passed asx=("variable_name", variable_component)
.Scatter
no longer has the argumentsx_comp
andy_comp
; the components have to be passed asx=("variable_name", variable_component)
.ZvsXY
no longer has the argumentsx_comp
,y_comp
andz_comp
; the components have to be passed asx=("variable_name", variable_component)
. #722RobustnessQuantifier.compute_approximation
usesNone
as default value forat_most_niter
.HessianApproximation.get_x_grad_history
usesNone
as default value forlast_iter
andat_most_niter
.HessianApproximation.build_approximation
usesNone
as default value forat_most_niter
.HessianApproximation.build_inverse_approximation
usesNone
as default value forat_most_niter
.LSTSQApprox.build_approximation
usesNone
as default value forat_most_niter
. #750PostFactory.create
usesclass_name
, thenopt_problem
and**options
as arguments. #752Dataset.plot
no longer refers to specific dataset plots, as ScatterMatrix, lines, curves…Dataset.plot
now refers to the standard pandas plot method. To retrieve ready-to-use plots, please check ingemseo.post.dataset
. #257
MDO processes¶
Renamed
InvalidDataException
toInvalidDataError
. #23Moved the
MatlabDiscipline
to the plugin gemseo-matlab.Rename
MakeFunction
toMDODisciplineAdapter
.In
MDODisciplineAdapter
, replace the argumentmdo_function
of typeMDODisciplineAdapterGenerator
by the argumentdiscipline
of typeMDODiscipline
.Rename
MDOFunctionGenerator
toMDODisciplineAdapterGenerator
. #412Rename
AbstractCache.export_to_dataset
toAbstractCache.to_dataset
.Rename
AbstractCache.export_to_ggobi
toAbstractCache.to_ggobi
.Rename
Scenario.export_to_dataset
toScenario.to_dataset
.Rename
MDODiscipline._default_inputs
toMDODiscipline.default_inputs
.Rename
MDODiscipline.serialize
toMDODiscipline.to_pickle
.Rename
MDODiscipline.deserialize
toMDODiscipline.from_pickle
which is a static method.Rename
ScalabilityResult.save
toScalabilityResult.to_pickle
.Rename
BaseGrammar.convert_to_simple_grammar
toBaseGrammar.to_simple_grammar
.Removed the method
_update_grammar_input
fromScenario
,Scenario._update_input_grammar
shall be used instead. #558Scenario.xdsmize
Rename
latex_output
tosave_pdf
.Rename
html_output
tosave_html
.Rename
json_output
tosave_json
.Rename
open_browser
toshow_html
.Rename
outfilename
tofile_name
and do not use suffix.Rename
outdir
todirectory_path
.
XDSMizer
Rename
latex_output
tosave_pdf
.Rename
open_browser
toshow_html
.Rename
output_dir
todirectory_path
.Rename
XDSMizer.outdir
toXDSMizer.directory_path
.Rename
XDSMizer.outfilename
toXDSMizer.json_file_name
.Rename
XDSMizer.latex_output
toXDSMizer.save_pdf
.
XDSMizer.monitor
Rename
latex_output
tosave_pdf
.Rename
outfilename
tofile_name
and do not use suffix.Rename
outdir
todirectory_path
.
XDSMizer.run
Rename
latex_output
tosave_pdf
.Rename
html_output
tosave_html
.Rename
json_output
tosave_json
.Rename
open_browser
toshow_html
.Rename
outfilename
tofile_name
and do not use suffix.Rename
outdir
todirectory_path
and use"."
as default value.
StudyAnalysis.generate_xdsm
Rename
latex_output
tosave_pdf
.Rename
open_browser
toshow_html
.Rename
output_dir
todirectory_path
.
MDOCouplingStructure.plot_n2_chart
: renameopen_browser
toshow_html
.N2HTML
: renameopen_browser
toshow_html
.generate_n2_plot
renameopen_browser
toshow_html
.Scenario.xdsmize
: renameprint_statuses
tolog_workflow_status
.XDSMizer.monitor
: renameprint_statuses
tolog_workflow_status
.Rename
XDSMizer.print_statuses
toXDSMizer.log_workflow_status
.The CLI of the
StudyAnalysis
uses the shortcut-p
for the option--save_pdf
. #564Replace the argument
force_no_exec
byexecute
inMDODiscipline.linearize
andJacobianAssembly.total_derivatives
.Rename the argument
force_all
tocompute_all_jacobians
inMDODiscipline.linearize
. #644The names of the algorithms proposed by
CorrelationAnalysis
must be written in capital letters; seeCorrelationAnalysis.Method
. #654 #464DOEScenario
no longer has aseed
attribute. #621Remove
AutoPyDiscipline.get_return_spec_fromstr
. #661Remove
Scenario.get_optimum
; useScenario.optimization_result
instead. #770Rename
AutoPyDiscipline.in_names
toAutoPyDiscipline.input_names
.Rename
AutoPyDiscipline.out_names
toAutoPyDiscipline.output_names
. #661Replaced the module
parallel_execution.py
by the packageparallel_execution
.Renamed the class
ParallelExecution
toCallableParallelExecution
.Renamed the function
worker
toexecute_workers
.Renamed the argument
input_values
toinputs
.Removed the
ParallelExecution
methods:_update_local_objects
_run_task
_is_worker
_filter_ordered_outputs
_run_task_by_index
ParallelExecution
and its derive classes always take a collection of workers and no longer a single worker. #668Removed the property
penultimate_entry
fromSimpleCache
. #480Rename
GSNewtonMDA
toMDAGSNewton
. #703The enumeration
MDODiscipline.ExecutionStatus
replaced the constants:MDODiscipline.STATUS_VIRTUAL
MDODiscipline.STATUS_PENDING
MDODiscipline.STATUS_DONE
MDODiscipline.STATUS_RUNNING
MDODiscipline.STATUS_FAILED
MDODiscipline.STATUS_LINEARIZE
MDODiscipline.AVAILABLE_STATUSES
The enumeration
MDODiscipline.GrammarType
replaced the constants:MDODiscipline.JSON_GRAMMAR_TYPE
MDODiscipline.SIMPLE_GRAMMAR_TYPE
The enumeration
MDODiscipline.CacheType
replaced the constants:MDODiscipline.SIMPLE_CACHE
MDODiscipline.HDF5_CACHE
MDODiscipline.MEMORY_FULL_CACHE
The value
None
indicating no cache is replaced byMDODiscipline.CacheType.NONE
The enumeration
MDODiscipline.ReExecutionPolicy
replaced the constants:MDODiscipline.RE_EXECUTE_DONE_POLICY
MDODiscipline.RE_EXECUTE_NEVER_POLICY
The enumeration
derivation_modes.ApproximationMode
replaced the constants:derivation_modes.FINITE_DIFFERENCES
derivation_modes.COMPLEX_STEP
derivation_modes.AVAILABLE_APPROX_MODES
The enumeration
derivation_modes.DerivationMode
replaced the constants:derivation_modes.DIRECT_MODE
derivation_modes.REVERSE_MODE
derivation_modes.ADJOINT_MODE
derivation_modes.AUTO_MODE
derivation_modes.AVAILABLE_MODES
The enumeration
JacobianAssembly.DerivationMode
replaced the constants:JacobianAssembly.DIRECT_MODE
JacobianAssembly.REVERSE_MODE
JacobianAssembly.ADJOINT_MODE
JacobianAssembly.AUTO_MODE
JacobianAssembly.AVAILABLE_MODES
The enumeration
MDODiscipline.ApproximationMode
replaced the constants:MDODiscipline.FINITE_DIFFERENCES
MDODiscipline.COMPLEX_STEP
MDODiscipline.APPROX_MODES
The enumeration
MDODiscipline.LinearizationMode
replaced the constants:MDODiscipline.FINITE_DIFFERENCE
MDODiscipline.COMPLEX_STEP
MDODiscipline.AVAILABLE_APPROX_MODES
The high-level functions defined in
gemseo.problems.scalable.data_driven.api
have been moved togemseo.problems.scalable.data_driven
. #707Removed
StudyAnalysis.AVAILABLE_DISTRIBUTED_FORMULATIONS
.The enumeration
DiscFromExe.Parser
replaced the constants:DiscFromExe.Parsers
DiscFromExe.Parsers.KEY_VALUE_PARSER
DiscFromExe.Parsers.TEMPLATE_PARSER
The enumeration
MatlabEngine.ParallelType
replaced:matlab_engine.ParallelType
MDOFunciton.check_grad
argumentmethod
was renamed toapproximation_mode
and now expects to be passed anApproximationMode
.For
GradientApproximator
and its derived classes:Renamed the class attribute
ALIAS
to_APPROXIMATION_MODE
,Renamed the instance attribute
_par_args
to_parallel_args
,Renamed
GradientApproximationFactory
toGradientApproximatorFactory
and moved it to the modulegradient_approximator_factory.py
,Moved the duplicated functions to
error_estimators.py
:finite_differences.comp_best_step
finite_differences.compute_truncature_error
finite_differences.compute_cancellation_error
finite_differences.approx_hess
derivatives_approx.comp_best_step
derivatives_approx.compute_truncature_error
derivatives_approx.compute_cancellation_error
derivatives_approx.approx_hess
comp_best_step
was renamed tocompute_best_step
approx_hess
was renamed tocompute_hessian_approximation
To update a grammar from data names that shall be validated against Numpy arrays, the
update
method is now replaced by the methodupdate_from_names
.To update a
JSONGrammar
from a JSON schema, theupdate
method is now replaced by the methodupdate_from_schema
.Renamed
JSONGrammar.write
toJSONGrammar.to_file
.Renamed the argument
schema_path
tofile_path
for theJSONGrammar
constructor.To update a
SimpleGrammar
or aJSONGrammar
from a names and types, theupdate
method is now replaced by the methodupdate_from_types
. #741Renamed
HDF5Cache.hdf_node_name
toHDF5Cache.hdf_node_path
.tolerance
andname
are the first instantiation arguments ofHDF5Cache
, for consistency with other caches.Added the arguments
newton_linear_solver
andnewton_linear_solver_options
to the constructor ofMDANewtonRaphson
. These arguments are passed to the linear solver of the Newton solver used to solve the MDA coupling. #715MDA: Remove the method
set_residuals_scaling_options
. #780MDA
: Remove the attributes_scale_residuals_with_coupling_size
and_scale_residuals_with_first_norm
and add thescaling
and_scaling_data
attributes.The module
gemseo.problems.scalable.parametric.study
has been removed. #717
Optimisation & DOE¶
Moved the library of optimization algorithms
PSevenOpt
to the plugin gemseo-pseven.Moved the
PDFO
wrapper to the plugin gemseo-pdfo.Removed the useless exception
NloptRoundOffException
.Rename
MDOFunction.serialize
toMDOFunction.to_pickle
.Rename
MDOFunction.deserialize
toMDOFunction.from_pickle
which is a static method.DesignSpace
has a class methodDesignSpace.from_file
and an instance methodDesignSpace.to_file
.read_design_space
can read an HDF file.Rename
DesignSpace.export_hdf
toDesignSpace.to_hdf
.Rename
DesignSpace.import_hdf
toDesignSpace.from_hdf
which is a class method.Rename
DesignSpace.export_to_txt
toDesignSpace.to_csv
.Rename
DesignSpace.read_from_txt
toDesignSpace.from_csv
which is a class method.Rename
Database.export_hdf
toDatabase.to_hdf
.Replace
Database.import_hdf
by the class methodDatabase.from_hdf
and the instance methodDatabase.update_from_hdf
.Rename
Database.export_to_ggobi
toDatabase.to_ggobi
.Rename
Database.import_from_opendace
toDatabase.update_from_opendace
.Database
no longer has the argumentinput_hdf_file
; usedatabase = Database.from_hdf(file_path)
instead.Rename
OptimizationProblem.export_hdf
toOptimizationProblem.to_hdf
.Rename
OptimizationProblem.import_hdf
toOptimizationProblem.from_hdf
which is a class method.Rename
OptimizationProblem.export_to_dataset
toOptimizationProblem.to_dataset
.The argument
export_hdf
ofwrite_design_space
has been removed.Rename
export_design_space
towrite_design_space
.DesignSpace
no longer hasfile_path
as argument; usedesign_space = DesignSpace.from_file(file_path)
instead. #450Rename
iks_agg
tocompute_iks_agg
Rename
iks_agg_jac_v
tocompute_total_iks_agg_jac
Rename
ks_agg
tocompute_ks_agg
Rename
ks_agg_jac_v
tocompute_total_ks_agg_jac
Rename
max_agg
tocompute_max_agg
Rename
max_agg_jac_v
tocompute_max_agg_jac
Rename
sum_square_agg
tocompute_sum_square_agg
Rename
sum_square_agg_jac_v
tocompute_total_sum_square_agg_jac
Rename the first positional argument
constr_data_names
ofConstraintAggregation
toconstraint_names
.Rename the second positional argument
method_name
ofConstraintAggregation
toaggregation_function
.Rename the first position argument
constr_id
ofOptimizationProblem.aggregate_constraint
toconstraint_index
.Rename the aggregation methods
"pos_sum"
,"sum"
and"max"
to"POS_SUM"
,"SUM"
and"MAX"
.Rename
gemseo.algos.driver_lib
togemseo.algos.driver_library
.Rename
DriverLib
toDriverLibrary
.Rename
gemseo.algos.algo_lib
togemseo.algos.algorithm_library
.Rename
AlgoLib
toAlgorithmLibrary
.Rename
gemseo.algos.doe.doe_lib
togemseo.algos.doe.doe_library
.Rename
gemseo.algos.linear_solvers.linear_solver_lib
togemseo.algos.linear_solvers.linear_solver_library
.Rename
LinearSolverLib
toLinearSolverLibrary
.Rename
gemseo.algos.opt.opt_lib
togemseo.algos.opt.optimization_library
. #702The enumeration
DriverLib.DifferentiationMethod
replaced the constants:DriverLib.USER_DEFINED_GRADIENT
DriverLib.DIFFERENTIATION_METHODS
The enumeration
DriverLib.ApproximationMode
replaced the constants:DriverLib.COMPLEX_STEP_METHOD
DriverLib.FINITE_DIFF_METHOD
The enumeration
OptProblem.ApproximationMode
replaced the constants:OptProblem.USER_DEFINED_GRADIENT
OptProblem.DIFFERENTIATION_METHODS
OptProblem.NO_DERIVATIVES
OptProblem.COMPLEX_STEP_METHOD
OptProblem.FINITE_DIFF_METHOD
The method
Scenario.set_differentiation_method
no longer acceptsNone
for the argumentmethod
.The enumeration
OptProblem.ProblemType
replaced the constants:OptProblem.LINEAR_PB
OptProblem.NON_LINEAR_PB
OptProblem.AVAILABLE_PB_TYPES
The enumeration
DesignSpace.DesignVariableType
replaced the constants:DesignSpace.FLOAT
DesignSpace.INTEGER
DesignSpace.AVAILABLE_TYPES
The namedtuple
DesignSpace.DesignVariable
replaced:design_space.DesignVariable
The enumeration
MDOFunction.ConstraintType
replaced the constants:MDOFunction.TYPE_EQ
MDOFunction.TYPE_INEQ
The enumeration
MDOFunction.FunctionType
replaced the constants:MDOFunction.TYPE_EQ
MDOFunction.TYPE_INEQ
MDOFunction.TYPE_OBJ
MDOFunction.TYPE_OBS
The value
""
indicating no function type is replaced byMDOFunction.FunctionType.NONE
The enumeration
LinearSolver.Solver
replaced the constants:LinearSolver.LGMRES
LinearSolver.AVAILABLE_SOLVERS
The enumeration
ConstrAggregationDisc.EvaluationFunction
replaced:constraint_aggregation.EvaluationFunction
Use
True
as default value ofeval_observables
inOptimizationProblem.evaluate_functions
.Rename
outvars
tooutput_names
andargs
toinput_names
inMDOFunction
and its subclasses (names of arguments, attributes and methods).MDOFunction.has_jac
is a property.Remove
MDOFunction.has_dim
.Remove
MDOFunction.has_outvars
.Remove
MDOFunction.has_expr
.Remove
MDOFunction.has_args
.Remove
MDOFunction.has_f_type
.Rename
DriverLib.is_algo_requires_grad
toDriverLibrary.requires_gradient
.Rename
ConstrAggegationDisc
toConstraintAggregation
. #713Remove
Database.KEYSSEPARATOR
.Remove
Database._format_design_variable_names
.Remove
Database.get_value
; useoutput_value = database[x_vect]
instead ofoutput_value = database.get_value(x_vect)
.Remove
Database.contains_x
; usex_vect in database
instead ofdatabase.contains_x(x_vect)
.Remove
Database.contains_dataname
; useoutput_name in database.output_names
instead ofdatabase.contains_dataname(output_name)
.Remove
Database.set_dv_names
; usedatabase.input_names
to access the input names.Remove
Database.is_func_grad_history_empty
; usedatabase.check_output_history_is_empty
instead with any output name.Rename
Database.get_hashed_key
toDatabase.get_hashable_ndarray
.Rename
Database.get_all_data_names
toDatabase.get_function_names
.Rename
Database.missing_value_tag
toDatabase.MISSING_VALUE_TAG
.Rename
Database.get_x_by_iter
toDatabase.get_x_vect
.Rename
Database.clean_from_iterate
toDatabase.clear_from_iteration
.Rename
Database.get_max_iteration
toDatabase.n_iterations
.Rename
Database.notify_newiter_listeners
toDatabase.notify_new_iter_listeners
.Rename
Database.get_func_history
toDatabase.get_function_history
.Rename
Database.get_func_grad_history
toDatabase.get_gradient_history
.Rename
Database.get_x_history
toDatabase.get_x_vect_history
.Rename
Database.get_last_n_x
toDatabase.get_last_n_x_vect
.Rename
Database.get_x_at_iteration
toDatabase.get_x_vect
.Rename
Database.get_index_of
toDatabase.get_iteration
.Rename
Database.get_f_of_x
toDatabase.get_function_value
.Rename the argument
all_function_names
tofunction_names
inDatabase.to_ggobi
.Rename the argument
design_variable_names
toinput_names
inDatabase.to_ggobi
.Rename the argument
add_dv
towith_x_vect
inDatabase.get_history_array
.Rename the argument
values_dict
tooutput_value
inDatabase.store
.Rename the argument
x_vect
toinput_value
.Rename the argument
listener_func
tofunction
.Rename the arguments
funcname
,fname
anddata_name
tofunction_name
.Rename the arguments
functions
andnames
tofunction_names
.Rename the argument
names
tooutput_names
inDatabase.filter
.Rename the argument
x_hist
toadd_x_vect_history
inDatabase.get_function_history
andDatabase.get_gradient_history
.Database.get_x_vect
starts counting the iterations at 1.Database.clear_from_iteration
starts counting the iterations at 1.RadarChart
,TopologyView
andGradientSensitivity
starts counting the iterations at 1.The input history returned by
Database.get_gradient_history
andDatabase.get_function_history
is now a 2D NumPy array.Remove
Database.n_new_iteration
.Remove
Database.reset_n_new_iteration
.Remove the argument
reset_iteration_counter
inDatabase.clear
.The
Database
no longer uses the tag"Iter"
.The
Database
no longer uses the notion ofstacked_data
. #753Remove
MDOFunction.concatenate
; please useConcatenate
.Remove
MDOFunction.convex_linear_approx
; please useConvexLinearApprox
.Remove
MDOFunction.linear_approximation
; please usecompute_linear_approximation
.Remove
MDOFunction.quadratic_approx
; please usecompute_quadratic_approximation
.Remove
MDOFunction.restrict
; please useFunctionRestriction
.Remove
DOELibrary.compute_phip_criteria
; please usecompute_phip_criterion
.
UQ¶
The high-level functions defined in
gemseo.uncertainty.api
have been moved togemseo.uncertainty
.Rename
SensitivityAnalysis.export_to_dataset
toSensitivityAnalysis.to_dataset
.Rename
SensitivityAnalysis.save
toSensitivityAnalysis.to_pickle
.Rename
SensitivityAnalysis.load
toSensitivityAnalysis.from_pickle
which is a class method.ComposedDistribution
usesNone
as value for independent copula.ParameterSpace
no longer uses acopula
passed at instantiation but toParameterSpace.build_composed_distribution
.SPComposedDistribution
raises an error when set up with a copula different fromNone
. #655The enumeration
RobustnessQuantifier.Approximation
replaced the constant:RobustnessQuantifier.AVAILABLE_APPROXIMATIONS
The enumeration
OTDistributionFitter.DistributionName
replaced the constants:OTDistributionFitter.AVAILABLE_DISTRIBUTIONS
OTDistributionFitter._AVAILABLE_DISTRIBUTIONS
The enumeration
OTDistributionFitter.FittingCriterion
replaced the constants:OTDistributionFitter.AVAILABLE_FITTING_TESTS
OTDistributionFitter._AVAILABLE_FITTING_TESTS
The enumeration
OTDistributionFitter.SignificanceTest
replaced the constant:OTDistributionFitter.SIGNIFICANCE_TESTS
The enumeration
ParametricStatistics.DistributionName
replaced the constant:ParametricStatistics.AVAILABLE_DISTRIBUTIONS
The enumeration
ParametricStatistics.FittingCriterion
replaced the constant:ParametricStatistics.AVAILABLE_FITTING_TESTS
The enumeration
ParametricStatistics.SignificanceTest
replaced the constant:ParametricStatistics.SIGNIFICANCE_TESTS
The enumeration
SobolAnalysis.Algorithm
replaced the constant:SobolAnalysis.Algorithm.Saltelli
bySobolAnalysis.Algorithm.SALTELLI
SobolAnalysis.Algorithm.Jansen
bySobolAnalysis.Algorithm.JANSEN
SobolAnalysis.Algorithm.MauntzKucherenko
bySobolAnalysis.Algorithm.MAUNTZ_KUCHERENKO
SobolAnalysis.Algorithm.Martinez
bySobolAnalysis.Algorithm.MARTINEZ
The enumeration
SobolAnalysis.Method
replaced the constant:SobolAnalysis.Method.first
bySobolAnalysis.Method.FIRST
SobolAnalysis.Method.total
bySobolAnalysis.Method.TOTAL
The enumeration
ToleranceInterval.ToleranceIntervalSide
replaced:distribution.ToleranceIntervalSide
The namedtuple
ToleranceInterval.Bounds
replaced:distribution.Bounds
Remove
n_legend_cols
inParametricStatistics.plot_criteria
.Rename
variables_names
,variables_sizes
andvariables_types
tovariable_names
,variable_sizes
andvariable_types
.Rename
inputs_names
andoutputs_names
toinput_names
andoutput_names
.Rename
constraints_names
toconstraint_names
.Rename
functions_names
tofunction_names
.Rename
inputs_sizes
andoutputs_sizes
toinput_sizes
andoutput_sizes
.Rename
disciplines_names
todiscipline_names
.Rename
jacobians_names
tojacobian_names
.Rename
observables_names
toobservable_names
.Rename
columns_names
tocolumn_names
.Rename
distributions_names
todistribution_names
.Rename
options_values
tooption_values
.Rename
constraints_values
toconstraint_values
.Rename
jacobians_values
tojacobian_values
.SobolAnalysis.AVAILABLE_ALGOS
no longer exists; use theenum
SobolAnalysis.Algorithm
instead.MLQualityMeasure.evaluate
no longer exists; please use eitherMLQualityMeasure.evaluate_learn
,MLQualityMeasure.evaluate_test
,MLQualityMeasure.evaluate_kfolds
,MLQualityMeasure.evaluate_loo
andMLQualityMeasure.evaluate_bootstrap
.Remove
OTComposedDistribution.AVAILABLE_COPULA_MODELS
; please useOTComposedDistribution.CopulaModel
.Remove
ComposedDistribution.AVAILABLE_COPULA_MODELS
; please useComposedDistribution.CopulaModel
.Remove
SPComposedDistribution.AVAILABLE_COPULA_MODELS
; please useSPComposedDistribution.CopulaModel
.Remove
ComposedDistribution.INDEPENDENT_COPULA
; please useComposedDistribution.INDEPENDENT_COPULA
.Remove
SobolAnalysis.AVAILABLE_ALGOS
; please useSobolAnalysis.Algorithm
.
Technical improvements¶
Moved
gemseo.utils.testing.compare_dict_of_arrays
togemseo.utils.comparisons.compare_dict_of_arrays
.Moved
gemseo.utils.testing.image_comparison
togemseo.utils.testing.helpers.image_comparison
.Moved
gemseo.utils.pytest_conftest
togemseo.utils.testing.pytest_conftest
.Moved
gemseo.utils.testing.pytest_conftest.concretize_classes
togemseo.utils.testing.helpers.concretize_classes
. #173Dataset
inherits fromDataFrame
and uses multi-indexing columns. Some methods have been added to improve the use of multi-index;Dataset.transform_variable
has been renamed toDataset.transform_data
. Two derived classes (IODataset
andOptimizationDataset
) can be considered for specific usages.Dataset
can be imported fromgemseo.datasets.dataset
.The default group of
Dataset
isparameters
.Dataset
no longer has theget_data_by_group
,get_all_data
andget_data_by_names
methods. UseDataset.get_view`
instead. It returns a slicedDataset
, to focus on some parts. Different formats can be used to extract data using pandas default methods. For instance,get_data_by_names
can be replaced byget_view(variable_names=var_name).to_numpy()
.In a
Dataset
, a variable is identified by a tuple(group_name, variable_name)
. This tuple called variable identifier is unique, contrary to a variable name as it can be used in several groups. The size of a variable corresponds to its number of components. dataset.variable_names_to_n_components[variable_name]`` returns the size of all the variables namedvariable_name
whilelen(dataset.get_variable_components(group_name, variable_name))
returns the size of the variable namedvariable_name
and belonging togroup_name
.The methods
to_dataset
no longer have an argumentby_group
as theDataset
no longer stores the data by group (the previousDataset
stored the data in a dictionary indexed by either variable names or group names).Dataset
no longer has theexport_to_dataframe
method, since it is aDataFrame
itself.Dataset
no longer has thelength
; uselen(dataset)
instead.Dataset
no longer has theis_empty
method. Use pandas attributeempty
instead.Dataset
no longer has theexport_to_cache
method.Dataset
no longer has therow_names
attribute. Useindex
instead.Dataset.add_variable
no longer has thegroup
argument. Usegroup_name
instead.Dataset.add_variable
no longer has thename
argument. Usevariable_name
instead.Dataset.add_variable
no longer has thecache_as_input
argument.Dataset.add_group
no longer has thegroup
argument. Usegroup_name
instead.Dataset.add_group
no longer has thevariables
argument. Usevariable_names
instead.Dataset.add_group
no longer has thesizes
argument. Usevariable_names_to_n_components
instead.Dataset.add_group
no longer has thecache_as_input
andpattern
arguments.Renamed
Dataset.set_from_array
toDataset.from_array
.Renamed
Dataset.get_names
toDataset.get_variable_names
.Renamed
Dataset.set_metadata
toDataset.misc
.Removed
Dataset.n_samples
in favor oflen()
.gemseo.load_dataset
is renamed:gemseo.create_benchmark_dataset
. Can be used to create a Burgers, Iris or Rosenbrock dataset.BurgerDataset
no longer exists. Create a Burger dataset withcreate_burgers_dataset
.IrisDataset
no longer exists. Create an Iris dataset withcreate_iris_dataset
.RosenbrockDataset
no longer exists. Create a Rosenbrock dataset withcreate_rosenbrock_dataset
.problems.dataset.factory
no longer exists.Scenario.to_dataset
no longer has theby_group
argument.AbstractCache.to_dataset
no longer has theby_group
andname
arguments. #257Rename
MDOObjScenarioAdapter
toMDOObjectiveScenarioAdapter
.The scenario adapters
MDOScenarioAdapter
andMDOObjectiveScenarioAdapter
are now located in the packagegemseo.disciplines.scenario_adapters
. #407Moved
gemseo.core.factory.Factory
togemseo.core.base_factory.BaseFactory
Removed the attribute
factory
of the factories.Removed
Factory._GEMS_PATH
.Moved
singleton._Multiton
tofactory._FactoryMultitonMeta
Renamed
Factory.cache_clear
toFactory.clear_cache
.Renamed
Factory.classes
toFactory.class_names
.Renamed
Factory
toBaseFactory
.Renamed
DriverFactory
toBaseAlgoFactory
. #522The way non-serializable attributes of an
MDODiscipline
are treated has changed. From now on, instead of defining the attributes to serialize with the class variable_ATTR_TO_SERIALIZE
,MDODiscipline
and its child classes shall define the attributes not to serialize with the class variable_ATTR_NOT_TO_SERIALIZE
. When a new attribute that is not serializable is added to the list, the methods__setstate__
and__getstate__
shall be modified to handle its creation properly. #699utils.python_compatibility
was moved and renamed toutils.compatibility.python
. #689The enumeration
FilePathManager.FileType
replaced the constant:file_type_manager.FileType
Rename
Factory.classes
toFactory.class_names
.Move
ProgressBar
andTqdmToLogger
togemseo.algos.progress_bar
.Move
HashableNdarray
togemseo.algos.hashable_ndarray
.Move the HDF methods of
Database
toHDFDatabase
.Remove
BaseEnum.get_member_from_name
; please useBaseEnum.__getitem__
.StudyAnalysis.disciplines_descr
has been removed; useMDOStudyAnalysis.study.disciplines
instead.StudyAnalysis.scenarios_descr
has been removed; useMDOStudyAnalysis.study.scenarios
instead.StudyAnalysis.xls_study_path
has been removed; useCouplingStudyAnalysis.study.xls_study_path
instead.gemseo.utils.study_analysis.StudyAnalysis
has been moved togemseo.utils.study_analyses.mdo_study_analysis
and renamed toMDOStudyAnalysis
.gemseo.utils.study_analysis.XLSStudyParser
has been moved togemseo.utils.study_analyses.xls_study_parser
.gemseo.utils.study_analysis_cli
has been moved togemseo.utils.study_analyses
.MDOStudyAnalysis.generate_xdsm
no longer returns aMDOScenario
but anXDSM
.The option
fig_size
of thegemseo-study
has been replaced by the optionsheight
andwidth
.The CLI
gemseo-study
can be used for MDO studies withgemseo-study xls_file_path
and coupling studies withgemseo-study xls_file_path -t coupling
.
Removed¶
Removed the
gemseo.core.jacobian_assembly
module that is now ingemseo.core.derivatives.jacobian_assembly
.Removed the obsolete
snopt
wrapper.Removed Python 3.7 support.
4.0.0¶
API changes that impact user scripts code¶
In post-processing,
fig_size
is the unique name to identify the size of a figure and the occurrences offigsize
,figsize_x
andfigsize_y
have been replaced byfig_size
,fig_size_x
andfig_size_y
.The argument
parallel_exec
inIDF.__init__()
has been renamed ton_processes
.The argument
quantile
ofVariableInfluence
has been renamed tolevel
.BasicHistory
:data_list
has been renamed tovariable_names
.MDAChain.sub_mda_list
has been renamed toMDAChain.inner_mdas
.RadarChart
:constraints_list
has been renamed toconstraint_names
.ScatterPlotMatrix
:variables_list
has been renamed tovariable_names
.All
MDA
algos now count their iterations starting from0
.The
MDA.residual_history
is now a list of normed residuals.The argument
figsize
inMDA.plot_residual_history()
was renamed tofig_size
to be consistent withOptPostProcessor
algos.ConstraintsHistory
:constraints_list
has been renamed toconstraint_names
.The
MDAChain
now takesinner_mda_name
as argument instead ofsub_mda_class
.The
MDF
formulation now takesmain_mda_name
as argument instead ofmain_mda_class
andinner_mda_name
instead of -sub_mda_class
.The
BiLevel
formulation now takesmain_mda_name
as argument instead ofmda_name
. It is now possible to explicitly define aninner_mda_name
as well.In
DesignSpace
:get_current_x
has been renamed toget_current_value()
.has_current_x
has been renamed tohas_current_value()
.set_current_x
has been renamed toset_current_value()
.Remove
get_current_x_normalized
andget_current_x_dict
.
The short names of some machine learning algorithms have been replaced by conventional acronyms.
MatlabDiscipline.__init__()
:input_data_list
andoutput_data_list
has been renamed toinput_names
andoutput_names
.save_matlab_file()
:dict_to_save
has been renamed todata
.The classes of the regression algorithms are renamed as
{Prefix}Regressor
.The class
ConcatenationDiscipline
has been renamed toConcatenater
.In Caches:
input_names
has been renamed toinput_names
.get_all_data()
has been replaced by[cache_entry for cache_entry in cache]
.get_data
has been removed.get_length()
has been replaced bylen(cache)
.get_outputs(input_data)
has been replaced bycache[input_data].outputs
.{INPUTS,JACOBIAN,OUTPUTS,SAMPLE}_GROUP
have been removed.get_last_cached_inputs()
has been replaced bycache.last_entry.inputs
.get_last_cached_outputs()
has been replaced bycache.last_entry.outputs
.max_length
has been removed.merge
has been renamed toupdate()
.output_names
has been renamed tooutput_names
.varsizes
has been renamed tonames_to_sizes
.samples_indices
has been removed.
API changes that impact discipline wrappers¶
In Grammar:
update_from
has been renamed toupdate()
.remove_item(name)
has been replaced bydel grammar[name]
.get_data_names
has been renamed tokeys()
.initialize_from_data_names
has been renamed toupdate()
.initialize_from_base_dict
has been renamed toupdate_from_data()
.update_from_if_not_in
has been renamed to now useupdate()
withexclude_names
.set_item_value
has been removed.remove_required(name)
has been replaced byrequired_names.remove(name)
.data_names
has been renamed tokeys()
.data_types
has been renamed tovalues()
.update_elements
has been renamed toupdate()
.update_required_elements
has been removed.init_from_schema_file
has been renamed toupdate_from_file()
.
API changes that affect plugin or features developers¶
AlgoLib.lib_dict
has been renamed toAlgoLib.descriptions
.gemseo.utils.data_conversion.FLAT_JAC_SEP
has been renamed toSTRING_SEPARATOR
.In
gemseo.utils.data_conversion
:DataConversion.dict_to_array
has been renamed toconcatenate_dict_of_arrays_to_array()
.DataConversion.list_of_dict_to_array
removed.DataConversion.array_to_dict
has been renamed tosplit_array_to_dict_of_arrays()
.DataConversion.jac_2dmat_to_dict
has been renamed tosplit_array_to_dict_of_arrays()
.DataConversion.jac_3dmat_to_dict
has been renamed tosplit_array_to_dict_of_arrays()
.DataConversion.dict_jac_to_2dmat
removed.DataConversion.dict_jac_to_dict
has been renamed toflatten_nested_dict()
.DataConversion.flat_jac_name
removed.DataConversion.dict_to_jac_dict
has been renamed tonest_flat_bilevel_dict()
.DataConversion.update_dict_from_array
has been renamed toupdate_dict_of_arrays_from_array()
.DataConversion.deepcopy_datadict
has been renamed todeepcopy_dict_of_arrays()
.DataConversion.get_all_inputs
has been renamed toget_all_inputs()
.DataConversion.get_all_outputs
has been renamed toget_all_outputs()
.
DesignSpace.get_current_value
can now return a dictionary of NumPy arrays or normalized design values.The method
MDOFormulation.check_disciplines
has been removed.The class variable
MLAlgo.ABBR
has been renamed toMLAlgo.SHORT_ALGO_NAME
.For
OptResult
andMDOFunction
:get_data_dict_repr
has been renamed toto_dict
.Remove plugin detection for packages with
gemseo_
prefix.MDODisciplineAdapterGenerator.get_function
:input_names_list
andoutput_names_list
has been renamed tooutput_names
andoutput_names
.MDOScenarioAdapter.__init__
:inputs_list
andoutputs_list
has been renamed toinput_names
andoutput_names
.OptPostProcessor.out_data_dict
has been renamed toOptPostProcessor.materials_for_plotting
.In
ParallelExecution
:input_data_list
has been renamed toinput_values
.worker_list
has been renamed toworkers
.
In Grammar,
is_type_array
has been renamed tois_array()
.
Internal changes that rarely or not affect users¶
In Grammar:
load_data
has been renamed tovalidate()
.is_data_name_existing(name)
has been renamed toname in grammar
.is_all_data_names_existing(names)
has been replaced byset(names) <= set(keys())
.to_simple_grammar
has been renamed toconvert_to_simple_grammar()
.is_required(name)
has been renamed toname in required_names
.write_schema
has been renamed towrite()
.schema_dict
has been renamed toschema
.JSONGrammar
class attributes removed has been renamed toPROPERTIES_FIELD
,REQUIRED_FIELD
,TYPE_FIELD
,OBJECT_FIELD
,TYPES_MAP
.AbstractGrammar
has been renamed toBaseGrammar
.
AnalyticDiscipline.expr_symbols_dict
has been renamed toAnalyticDiscipline.output_names_to_symbols
.AtomicExecSequence.get_state_dict
has been renamed toAtomicExecSequence.get_statuses()
.-
CompositeExecSequence.get_state_dict
has been renamed toCompositeExecSequence.get_statuses()
.CompositeExecSequence.sequence_list
has been renamed toCompositeExecSequence.sequences
.
Remove
gemseo.utils.multi_processing
.
3.0.0¶
As GEMS has been renamed to GEMSEO, upgrading from version 2 to version 3 requires to change all the import statements of your code from
import gems
from gems.x.y import z
to
import gemseo
from gemseo.x.y import z
2.0.0¶
The API of GEMS 2 has been slightly modified with respect to GEMS 1. In particular, for all the supported Python versions, the strings shall to be encoded in unicode while they were previously encoded in ASCII.
That kind of error:
ERROR - 17:11:09 : Invalid data in : MDOScenario_input
', error : data.algo must be string
Traceback (most recent call last):
File "plot_mdo_scenario.py", line 85, in <module>
scenario.execute({"algo": "L-BFGS-B", "max_iter": 100})
File "/home/distracted_user/workspace/gemseo/src/gemseo/core/discipline.py", line 586, in execute
self.check_input_data(input_data)
File "/home/distracted_user/workspace/gemseo/src/gemseo/core/discipline.py", line 1243, in check_input_data
raise InvalidDataException("Invalid input data for: " + self.name)
gemseo.core.grammar.InvalidDataException: Invalid input data for: MDOScenario
is most likely due to the fact that you have not migrated your code to be compliant with GEMSEO 2. To migrate your code, add the following import at the beginning of all your modules defining literal strings:
from __future__ import unicode_literals