This page contains the history of the breaking changes in GEMSEO. The codes using those shall be updated according to the target GEMSEO version.

## 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 of figsize, figsize_x and figsize_y have been replaced by fig_size, fig_size_x and fig_size_y.

• The argument parallel_exec in IDF.__init__() has been renamed to n_processes.

• The argument quantile of VariableInfluence has been renamed to level.

• BasicHistory: data_list has been renamed to variable_names.

• MDAChain.sub_mda_list has been renamed to MDAChain.inner_mdas.

• RadarChart: constraints_list has been renamed to constraint_names.

• ScatterPlotMatrix: variables_list has been renamed to variable_names.

• All MDA algos now count their iterations starting from 0.

• The MDA.residual_history is now a list of normed residuals.

• The argument figsize in MDA.plot_residual_history() was renamed to fig_size to be consistent with OptPostProcessor algos.

• ConstraintsHistory: constraints_list has been renamed to constraint_names.

• The MDAChain now takes inner_mda_name as argument instead of sub_mda_class.

• The MDF formulation now takes main_mda_name as argument instead of main_mda_class and inner_mda_name instead of - sub_mda_class.

• The BiLevel formulation now takes main_mda_name as argument instead of mda_name. It is now possible to explicitly define an inner_mda_name as well.

• The short names of some machine learning algorithms have been replaced by conventional acronyms.

• MatlabDiscipline.__init__(): input_data_list and output_data_list has been renamed to input_names and output_names.

• save_matlab_file(): dict_to_save has been renamed to data.

• The classes of the regression algorithms are renamed as {Prefix}Regressor.

• The class ConcatenationDiscipline has been renamed to Concatenater.

• In Caches:

• inputs_names has been renamed to input_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 by len(cache).

• get_outputs(input_data) has been replaced by cache[input_data].outputs.

• {INPUTS,JACOBIAN,OUTPUTS,SAMPLE}_GROUP have been removed.

• get_last_cached_inputs() has been replaced by cache.last_entry.inputs.

• get_last_cached_outputs() has been replaced by cache.last_entry.outputs.

• max_length has been removed.

• merge has been renamed to update().

• outputs_names has been renamed to output_names.

• varsizes has been renamed to names_to_sizes.

• samples_indices has been removed.

### API changes that impact discipline wrappers¶

• In Grammar:

• update_from has been renamed to update().

• remove_item(name) has been replaced by del grammar[name].

• get_data_names has been renamed to keys().

• initialize_from_data_names has been renamed to update().

• initialize_from_base_dict has been renamed to update_from_data().

• update_from_if_not_in has been renamed to now use update() with exclude_names.

• set_item_value has been removed.

• remove_required(name) has been replaced by required_names.remove(name).

• data_names has been renamed to keys().

• data_types has been renamed to values().

• update_elements has been renamed to update().

• update_required_elements has been removed.

• init_from_schema_file has been renamed to update_from_file().

### Internal changes that rarely or not affect users¶

• In Grammar:

• load_data has been renamed to validate().

• is_data_name_existing(name) has been renamed to name in grammar.

• is_all_data_names_existing(names) has been replaced by set(names) <= set(keys()).

• to_simple_grammar has been renamed to convert_to_simple_grammar().

• is_required(name) has been renamed to name in required_names.

• write_schema has been renamed to write().

• schema_dict has been renamed to schema.

• JSONGrammar class attributes removed has been renamed to PROPERTIES_FIELD, REQUIRED_FIELD, TYPE_FIELD, OBJECT_FIELD, TYPES_MAP.

• AbstractGrammar has been renamed to BaseGrammar.

• AnalyticDiscipline.expr_symbols_dict has been renamed to AnalyticDiscipline.output_names_to_symbols.

• AtomicExecSequence.get_state_dict has been renamed to AtomicExecSequence.get_statuses().

• CompositeExecSequence.get_state_dict has been renamed to CompositeExecSequence.get_statuses().

• CompositeExecSequence.sequence_list has been renamed to CompositeExecSequence.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