Skip to content

Commit

Permalink
Release 041 (#279)
Browse files Browse the repository at this point in the history
* Release 0.4.1

* fix deprecated tostring_rgb

---------

Co-authored-by: Вадим Ахмеров <[email protected]>
  • Loading branch information
nicl-nno and Вадим Ахмеров authored Dec 25, 2024
1 parent 45215bf commit c85a9d7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions golem/core/optimisers/opt_history_objects/opt_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions golem/visualisation/opt_viz_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit c85a9d7

Please sign in to comment.