-
Notifications
You must be signed in to change notification settings - Fork 7
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
Output clg #229
Output clg #229
Conversation
SessionID string | ||
Context netcontext.Context | ||
Expectation spec.Expectation | ||
SessionID string | ||
|
||
// TODO we want to track the original input that was provided from the |
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.
The original input needs to be tracked to forward the correct network payload from the output CLG to the input CLG in case a provided expectation was not met.
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.
Now we lookup the original input using the information ID tracked in the context and send it to the input CLG referenced by the CLG tree ID tracked by the context.
@@ -28,6 +28,9 @@ func (n *network) payloadFromConnections(behaviorID string, queue []spec.Network | |||
// storage. Here it is important to obtain the order of the behavior IDs | |||
// stored as connections. They represent the input interface of the requested | |||
// CLG. | |||
// | |||
// TODO there needs to be some sort of variation when executing existing CLG trees |
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.
We need to add variations to the selection process of network payloads being merged together. The requested CLG needs to be executed with different inputs from time to time, regardless known successful configurations.
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.
The implementation changed. There is now spec.Activator
to manage the activation process.
// within several CLGs. That way the network creates its own connections | ||
// based on learned experiences. | ||
// | ||
// TODO where are these connections coming from? |
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.
Lets add a comment.
There are no known connections when executing a new CLG tree. The first execution of a CLG tree records some sort of event log. Connections are only known beginning with the second execution of the same CLG tree. Then a replay of the recorded event log can be done.
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.
The implementation changed. There is now spec.Forwarder
to manage the forwarding process.
// based on learned experiences. | ||
// | ||
// TODO where are these connections coming from? | ||
// TODO if there are none, we need to find some randomly |
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.
We need to create new connections in case there are none.
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.
The implementation changed. There is now spec.Forwarder
to manage the forwarding process.
// | ||
// TODO where are these connections coming from? | ||
// TODO if there are none, we need to find some randomly | ||
// TODO there needs to be some sort of variation when executing existing CLG trees |
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.
Even if there are connections stored, we need to add variations to the selection process. That way known CLG trees can be improved.
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.
The implementation changed. There is now spec.Forwarder
to manage the forwarding process.
} | ||
|
||
// TODO fetch CLG tree ID using information ID | ||
// TODO fetch input CLG ID (behaviorID) using CLG tree ID |
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.
We need to lookup the behavior ID of the input CLG of the current CLG tree. Using this behavior ID we can forward the network payload from the output CLG to the input CLG.
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.
The implementation changed. There is now spec.Forwarder
to manage the forwarding process.
n.Log.WithTags(spec.Tags{C: nil, L: "E", O: n, V: 4}, "%#v", maskAny(err)) | ||
continue | ||
} | ||
// TODO write a new CLG tree ID and add it to context |
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.
We need to create a new CLG tree ID and connect it with the behavior ID of the input CLG.
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.
Done.
Current coverage is 89.90% (diff: 62.18%)
|
@@ -15,8 +15,11 @@ import ( | |||
type key string | |||
|
|||
const ( | |||
behaviorIDKey key = "behavior-id" | |||
// TODO make the context marshalable |
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.
We need to make the context marshalable.
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.
Done.
not clean. I now pursue an approach using a task system. I think this will give | ||
more controle over the communication processes within the neural network. | ||
|
||
TODO |
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.
We need to write the diary.
@@ -4,6 +4,8 @@ import ( | |||
"fmt" | |||
) | |||
|
|||
// TODO rename to NetworkKeyFormat, NewNetworkKey |
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.
We need to rename CLGKeyFormat
to NetworkKeyFormat
, etc..
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.
Done.
return nil, maskAnyf(invalidBehaviourIDError, "must not be empty") | ||
} | ||
behaviourIDsKey := key.NewCLGKey("forward:configuration:behaviour-id:%s:behaviour-ids", behaviourID) | ||
// TODO add closer instead of nil |
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.
Instead of using the closer we should check if the set methods make sense to be used here. Further there should be a method to fetch all elements of a set at once. The forwarder limits the number of elements stored per CLG anyway, so walking the elements of a set incrementally is not necessary.
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.
There is now a spec.Storage.GetAllFromSet
method.
return newNetworkPayloads, nil | ||
} | ||
|
||
// TODO this should probably be moved to the output CLG |
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.
We should move this probably to the output CLG.
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.
Done.
// NewNetworkPayloads | ||
// | ||
// TODO | ||
Forward(CLG CLG, networkPayload NetworkPayload) error |
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.
We need more documentation here.
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.
Done.
// TODO | ||
EventListener(canceler <-chan struct{}) error | ||
|
||
// TODO |
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.
Write more docs.
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.
Done.
@@ -203,6 +202,26 @@ func (s *storage) GetStringMap(key string) (map[string]string, error) { | |||
return nil, notFoundError | |||
} | |||
|
|||
// TODO | |||
func (s *storage) PopFromList(key string) (string, error) { |
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.
Implement.
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.
Done.
@@ -244,6 +244,54 @@ func (s *storage) GetStringMap(key string) (map[string]string, error) { | |||
return result, nil | |||
} | |||
|
|||
// TODO | |||
func (s *storage) PopFromList(key string) (string, error) { |
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.
Implement.
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.
Done.
The PR is huge again. We stop here. The only additional thing left is now writing a diary entry. The next step is to add the event tracker to create more connections and make the forwarder actually work. |
LGTM |
abstract
This PR goes towards #172.
fixes
This PR fixes #193.
checklist