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

Preserving of optimisation results implemented #37

Merged
merged 5 commits into from
Aug 18, 2022
Merged

Conversation

nicl-nno
Copy link
Contributor

Results of gen. dis. can be saved in JSON using Result class.

@pep8speaks
Copy link

pep8speaks commented Jul 25, 2022

Hello @nicl-nno! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-08-18 16:05:37 UTC

gefest/core/serialization/serializer.py Outdated Show resolved Hide resolved
gefest/core/structure/polygon.py Show resolved Hide resolved
gefest/core/viz/struct_vizualizer.py Outdated Show resolved Hide resolved
@nicl-nno nicl-nno requested a review from DenisSidoren August 6, 2022 17:17

@staticmethod
def _get_class(class_path: str) -> Type[INSTANCE_OR_CALLABLE]:
"""Gets the object type from the class_path
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

этот метод скрытый, зачем его документировать докстрингами?

если им можно пользоваться, то почему он не может быть обычным?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Документировать не обязательно, но лишним не будет. В таком виде взял из FEDOT-а.

"""Decodes every JSON-object to python class/func object or just returns dict

Args:
json_obj: dict[str, Any] to be decoded into Python class, function or
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

типы объектов принималось обозначать через type, то есть dict[str, Any]
в таком случае этот объект будет в симпатишном квадратике

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

при этом сами объекты, например Point, Domain и прочее, вот так -> :obj:Domain

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пока просто убрал дублирующую type hint-ы типизацию.

@nicl-nno nicl-nno merged commit afd2a58 into main Aug 18, 2022
@nicl-nno nicl-nno deleted the opt-res-save branch August 30, 2022 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants