-
Notifications
You must be signed in to change notification settings - Fork 42
Improve algo #84
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
Improve algo #84
Conversation
|
Related to #72 |
| alias="Entrypoint", | ||
| properties=entrypoint_properties) | ||
| self.redis_graph.add_node(entrypoint_node) | ||
| redis_connection.set("EntryPoint", entrypoint_properties) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shravandoda classes_objects and collection-endpoints also have the same error.
I think @PrajwalM2212 also working on the same issue in PR #73. So, Please ask him.
hydra_agent/classes_objects.py
Outdated
| break | ||
| break | ||
| node_alias[str(endpoint)] = class_object_node | ||
| endpoint_property_list[endpoint] = property_list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repetition of this line. see line 232.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sandeepsajan0, I think I should close this PR (as @Mec-iS stated in #83)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shravandoda You can close it. And try to do it in a better way as @Mec-iS suggest.
|
Closing as requested |
Fixes #83
This implementation works by creating a dictionary local to the
endpointclassesmethod. The dictionary has aliases of the nodes as keys and the corresponding graph nodes as values. Then it uses another methodconnect_nodeswhich takes in the dictionary as well as theendpoint_property_listas argument and adds edges between the nodes. This way it does not have to traverse through the whole graph (which containscollectionEndpointsas well while the dictionary only contains concernedclassEndpoints). Although the space complexity of this method is greater than the current implementation but the time complexity is reduced (thanks to python's dictionary.get() method's average case time complexity of O(1)).@Mec-iS @sandeepsajan0 kindly review.