diff --git a/docs/source/conf.py b/docs/source/conf.py index fa13e6ea..541661d1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,7 +24,7 @@ author = 'NSS Lab' # The full version, including alpha/beta/rc tags -release = '0.4.0' +release = '0.4.1' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be diff --git a/golem/core/optimisers/opt_history_objects/opt_history.py b/golem/core/optimisers/opt_history_objects/opt_history.py index dafc84ca..76837ae1 100644 --- a/golem/core/optimisers/opt_history_objects/opt_history.py +++ b/golem/core/optimisers/opt_history_objects/opt_history.py @@ -174,6 +174,23 @@ def all_historical_quality(self, metric_position: int = 0) -> List[float]: def show(self): return OptHistoryVisualizer(self) + # def analyze_online(self, url='https://fedot.onti.actcognitive.org'): + # case_id = FILE_NAME.replace('.json', '') + str(uuid4()) + # history_url = f'{DOMAIN}/ws/sandbox/custom_{case_id}/history' + # post_url = f"{DOMAIN}/api/showcase/add" + # + # history_json = json.load(open(BASE_PATH.joinpath(FILE_NAME))) + # new_case = { + # 'case': { + # 'case_id': case_id, + # }, + # 'history': history_json + # } + # response = requests.post(post_url, json=new_case) + # + # print(response.text, response.status_code, ) + # print(f'IMPORTANT! Save this url.\n{history_url}') + def get_leaderboard(self, top_n: int = 10) -> str: """ Prints ordered description of the best solutions in history diff --git a/golem/visualisation/opt_viz_extra.py b/golem/visualisation/opt_viz_extra.py index 13eb83a2..b67c81c1 100644 --- a/golem/visualisation/opt_viz_extra.py +++ b/golem/visualisation/opt_viz_extra.py @@ -279,8 +279,8 @@ def extract_objectives(individuals: List[List[Any]], objectives_numbers: Tuple[i def figure_to_array(fig): - img = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8) - img = img.reshape(fig.canvas.get_width_height()[::-1] + (3,)) + img = np.frombuffer(fig.canvas.buffer_rgba(), dtype=np.uint8) + img = img.reshape(fig.canvas.get_width_height()[::-1] + (4,)) return img diff --git a/setup.py b/setup.py index 3f98be05..de791ec2 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ # The text of the README file NAME = 'thegolem' -VERSION = '0.4.0' +VERSION = '0.4.1' AUTHOR = 'NSS Lab' SHORT_DESCRIPTION = 'Framework for Graph Optimization and Learning by Evolutionary Methods'