Construct a GraphScope graph object on the default session. It will launch and set a session to default when there is no default session found. See params detail in :class:`graphscope.framework.graph.GraphDAGNode` Returns: :class:`graphscope.framework.graph.GraphDAGNode`: Eval
(
incoming_data=None,
oid_type="int64",
vid_type="uint64",
directed=True,
generate_eid=True,
retain_oid=True,
vertex_map="global",
compact_edges=False,
use_perfect_hash=False,
)
| 1578 | |
| 1579 | |
| 1580 | def g( |
| 1581 | incoming_data=None, |
| 1582 | oid_type="int64", |
| 1583 | vid_type="uint64", |
| 1584 | directed=True, |
| 1585 | generate_eid=True, |
| 1586 | retain_oid=True, |
| 1587 | vertex_map="global", |
| 1588 | compact_edges=False, |
| 1589 | use_perfect_hash=False, |
| 1590 | ): |
| 1591 | """Construct a GraphScope graph object on the default session. |
| 1592 | |
| 1593 | It will launch and set a session to default when there is no default session found. |
| 1594 | |
| 1595 | See params detail in :class:`graphscope.framework.graph.GraphDAGNode` |
| 1596 | |
| 1597 | Returns: |
| 1598 | :class:`graphscope.framework.graph.GraphDAGNode`: Evaluated in eager mode. |
| 1599 | |
| 1600 | Examples: |
| 1601 | |
| 1602 | .. code:: python |
| 1603 | |
| 1604 | >>> import graphscope |
| 1605 | >>> g = graphscope.g() |
| 1606 | |
| 1607 | >>> import graphscope |
| 1608 | >>> sess = graphscope.session() |
| 1609 | >>> sess.as_default() |
| 1610 | >>> g = graphscope.g() # creating graph on the session "sess" |
| 1611 | """ |
| 1612 | return get_default_session().g( |
| 1613 | incoming_data, |
| 1614 | oid_type, |
| 1615 | vid_type, |
| 1616 | directed, |
| 1617 | generate_eid, |
| 1618 | retain_oid, |
| 1619 | vertex_map, |
| 1620 | compact_edges, |
| 1621 | use_perfect_hash, |
| 1622 | ) |
| 1623 | |
| 1624 | |
| 1625 | @deprecated("Please use `graphscope.interactive` instead.") |