Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dayabay-model
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dayabay-data-preservation
dayabay-model
Commits
033f3050
Commit
033f3050
authored
1 year ago
by
Maxim Gonchar
Browse files
Options
Downloads
Patches
Plain Diff
feat: Node, add labels iterator
parent
9a59e93e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
subtrees/dagflow/dagflow/node.py
+6
-2
6 additions, 2 deletions
subtrees/dagflow/dagflow/node.py
with
6 additions
and
2 deletions
subtrees/dagflow/dagflow/node.py
+
6
−
2
View file @
033f3050
...
@@ -15,7 +15,7 @@ from .logger import Logger, get_logger
...
@@ -15,7 +15,7 @@ from .logger import Logger, get_logger
from
.output
import
Output
from
.output
import
Output
from
.iter
import
IsIterable
from
.iter
import
IsIterable
from
.types
import
GraphT
from
.types
import
GraphT
from
typing
import
Optional
,
List
,
Dict
,
Union
,
Callable
,
Any
,
Tuple
from
typing
import
Optional
,
List
,
Dict
,
Union
,
Callable
,
Any
,
Tuple
,
Generator
class
Node
(
Legs
):
class
Node
(
Legs
):
_name
:
str
_name
:
str
...
@@ -214,6 +214,10 @@ class Node(Legs):
...
@@ -214,6 +214,10 @@ class Node(Legs):
self
.
_graph
=
graph
self
.
_graph
=
graph
self
.
_graph
.
register_node
(
self
)
self
.
_graph
.
register_node
(
self
)
@property
def
labels
(
self
)
->
Generator
[
Tuple
[
str
,
str
],
None
,
None
]:
yield
from
self
.
_label
.
items
()
#
#
# Methods
# Methods
#
#
...
@@ -228,7 +232,7 @@ class Node(Legs):
...
@@ -228,7 +232,7 @@ class Node(Legs):
raise
ReconnectionError
(
input
=
inp
,
node
=
self
,
output
=
output
)
raise
ReconnectionError
(
input
=
inp
,
node
=
self
,
output
=
output
)
return
inp
return
inp
def
label
(
self
,
source
):
def
label
(
self
,
source
=
'
text
'
):
# if self._label:
# if self._label:
# kwargs.setdefault("name", self._name)
# kwargs.setdefault("name", self._name)
# return self._label.format(*args, **kwargs)
# return self._label.format(*args, **kwargs)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment