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

Tg 4.1.0 dev #171

Merged
merged 53 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b494116
tests in. run
RobRossmiller-TG May 21, 2024
99fd794
must divide by possible edge value
RobRossmiller-TG May 21, 2024
e95e9f7
update degree dataset
RobRossmiller-TG May 21, 2024
be4798f
mv pth
RobRossmiller-TG May 21, 2024
98e96e4
redo graph type1
RobRossmiller-TG May 22, 2024
3a75a55
testing readme
RobRossmiller-TG May 22, 2024
4b33c44
update data, test checks, run.sh
RobRossmiller-TG May 28, 2024
2364925
update param type
RobRossmiller-TG May 28, 2024
a0d5987
trigger auth request action
RobRossmiller-TG May 28, 2024
a9caf03
remove for loops
RobRossmiller-TG May 28, 2024
090362c
add reqs
RobRossmiller-TG May 28, 2024
356c36f
Merge pull request #149 from tigergraph/degree-cent
RobRossmiller-TG May 28, 2024
1918d1b
contribs
RobRossmiller-TG Jun 3, 2024
e47d576
contribs
RobRossmiller-TG Jun 3, 2024
8cf8606
rm optum contact email
RobRossmiller-TG Jun 4, 2024
43695f1
update contact methodgp
RobRossmiller-TG Jun 4, 2024
7cdf672
Merge pull request #151 from tigergraph/GML-1718-contributorsguide
RobRossmiller-TG Jun 4, 2024
1239a9f
feat(UDF): add milvus udfs
billshitg Jun 4, 2024
98fd582
Merge pull request #152 from tigergraph/GML-1733-milvus-udf
RobRossmiller-TG Jun 4, 2024
73cc81a
init
RobRossmiller-TG Jul 2, 2024
60818ce
complete graphs
RobRossmiller-TG Jul 3, 2024
6c8fb8f
update template query
RobRossmiller-TG Jul 3, 2024
8514ecc
Merge pull request #153 from tigergraph/GML-1805-weighted_degree_cent
RobRossmiller-TG Jul 3, 2024
31254c6
[GLE-7418] fix(install): move gsql temp folder into data folder
minzhangtg Jul 8, 2024
fa6f0fe
reorganize
RobRossmiller-TG Jul 9, 2024
08717cb
start fastrp testinggp
RobRossmiller-TG Jul 9, 2024
00506fc
use featurizer
RobRossmiller-TG Jul 9, 2024
5646e00
run.sh
RobRossmiller-TG Jul 9, 2024
040463f
Merge pull request #155 from tigergraph/GLE-7418
RobRossmiller-TG Jul 10, 2024
e52b383
[ALGOS-266] feat(algos): Rewrite the Label Propagation algorithm
xuanleilin Jul 15, 2024
bbcf2dc
[ALGOS-266] feat(algos): Adjust the code indentation to comply with t…
xuanleilin Jul 15, 2024
d5c1d9d
[ALGOS-266] feat(algos): print to file with vertex type if there're m…
xuanleilin Jul 16, 2024
76fcb43
[ALGOS-266] feat(algos): switch the order of parameter result_attribu…
xuanleilin Jul 16, 2024
6e3ac7e
[ALGOS-267] feat(algos): Improve the Louvain algorithm
xuanleilin Jul 16, 2024
362024f
Update tg_fastRP.gsql
RobRossmiller-TG Jul 16, 2024
ca797fc
Merge pull request #160 from tigergraph/GML-1812-specialized_testing
RobRossmiller-TG Jul 16, 2024
eb6d29f
update contrib
RobRossmiller-TG Jul 16, 2024
2c7f09e
Merge pull request #161 from tigergraph/update-contrib
RobRossmiller-TG Jul 16, 2024
23f0592
Merge branch 'tg_4.1.0_dev' into testing_updates
RobRossmiller-TG Jul 17, 2024
d34a3c5
rm ds store
RobRossmiller-TG Jul 17, 2024
231bc15
rm ds store
RobRossmiller-TG Jul 17, 2024
8ac3fae
Merge pull request #162 from tigergraph/testing_updates
RobRossmiller-TG Jul 18, 2024
d95a213
Merge pull request #159 from tigergraph/ALGOS-267
xuanleilin Jul 19, 2024
0c6d666
Merge pull request #157 from tigergraph/ALGOS-266
xuanleilin Jul 19, 2024
f783f7a
[ALGOS-266] feat(algos): Fix bugs for template query;
xuanleilin Jul 22, 2024
a8cae74
[ALGOS-267] feat(algos): Fix bugs for template query;
xuanleilin Jul 22, 2024
ae0522e
[ALGOS-267] feat(algos): Fix bugs for template query;
xuanleilin Jul 22, 2024
884833d
[ALGOS-266] feat(algos): Fix bugs for template query;
xuanleilin Jul 22, 2024
8c3431e
[ALGOS-267] feat(algos): Fix bugs for template query;
xuanleilin Jul 22, 2024
f3fa1f3
Merge pull request #167 from tigergraph/ALGOS-267
xuanleilin Jul 22, 2024
ad97e14
Merge pull request #166 from tigergraph/ALGOS-266
RobRossmiller-TG Jul 22, 2024
ee1ea0e
fix(tg_ExprUtil): add curl header
billshitg Sep 5, 2024
54cecf8
Merge pull request #168 from tigergraph/fix-milvus-udf-header
RobRossmiller-TG Sep 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
19 changes: 10 additions & 9 deletions .github/auto_request_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@
reviewers:
# The default reviewers if not assigned specifically
defaults:
- primary
- secondary
- tertiary
# Reviewer groups each of which has a list of GitHub usernames
groups:
group1:
primary:
- RobRossmiller-TG
- wyattjoynertg
- parkererickson-tg
- GabrielTigerGraph
secondary:
- RobRossmiller-TG
- wyattjoynertg
tertiary:
- xinyuchtg
- victorleeTG
# secondary:
# - RobRossmiller-TG
# - wyattjoynertg
# tertiary:
# - victorleeTG

files:
# All review request will be sent to the following groups/people.
'**':
- secondary
- tertiary
- primary
# - secondary
# - tertiary

options:
# ignore draft PRs
Expand Down
132 changes: 132 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement by reaching out to one of the contributors
of this repository. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contribution Guidelines

## Issues
If you discover an issue with an algorithm, or test, open an issue to point out areas for improvement.
If you are comfortable with it, implement the fix and open a PR.


## Adding tests
See the [testing contributors guide](tests/CONTRIBUTING.md)

## Coding Standards

### Languages

*GSQL*
- Follow the [GSQL Style Guide](https://docs.tigergraph.com/gsql-ref/current/appendix/gsql-style-guide)

*Python*
- Use the [ruff formatter](https://docs.astral.sh/ruff/formatter/#the-ruff-formatter) to format your code
- tests: pytest and networkx wherever applicable

*C/CPP*


## Pull Requests
- Make sure git knows your name and email address:
```
$ git config user.name "J. Random User"
$ git config user.email "[email protected]"
```
- The name and email address must be valid as we cannot accept anonymous contributions.
- Write good commit messages.
- Concise commit messages that describe your changes help us better understand your contributions.

## General Guidelines

Ensure your pull request (PR) adheres to the following guidelines:

- Try to make the name concise and descriptive.
- Give a good description of the change being made. Since this is very subjective, see the [Updating Your Pull Request (PR)](#updating-your-pull-request-pr) section below for further details.
- Every pull request should be associated with one or more issues. If no issue exists yet, please create your own.
- Make sure that all applicable issues are mentioned somewhere in the PR description. This can be done by typing # to bring up a list of issues.

### Updating Your Pull Request (PR)

A lot of times, making a PR adhere to the standards above can be difficult. If the maintainers notice anything that we'd like changed, we'll ask you to edit your PR before we merge it.
This applies to both the content documented in the PR and the changed contained within the branch being merged. There's no need to open a new PR. Just edit the existing one.

---

Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

98 changes: 50 additions & 48 deletions GDBMS_ALGO/centrality/degree_cent.gsql
Original file line number Diff line number Diff line change
@@ -1,70 +1,72 @@
CREATE TEMPLATE QUERY GDBMS_ALGO.centrality.degree_cent(SET<STRING> v_type_set, SET<STRING> e_type_set, SET<STRING> reverse_e_type_set, BOOL in_degree = TRUE, BOOL out_degree = TRUE,
INT top_k=100, BOOL print_results = TRUE, STRING result_attribute = "",STRING file_path = "") SYNTAX V1 {

INT top_k=100, BOOL print_results = TRUE, STRING result_attribute = "",STRING file_path = "", BOOL normalize = TRUE) SYNTAX V1 {
/*
First Author: <First Author Name>
First Commit Date: <First Commit Date>

Recent Author: <Recent Commit Author Name>
Recent Commit Date: <Recent Commit Date>
First Author: <First Author Name>
First Commit Date: <First Commit Date>

Recent Author: Rob Rossmiller
Recent Commit Date: 05/2024

Repository:
https://github.com/tigergraph/gsql-graph-algorithms/tree/master/algorithms/Centrality

Maturity:
Production
Repository:
https://github.com/tigergraph/gsql-graph-algorithms/tree/master/algorithms/Centrality

Description:
Compute degree Centrality for each VERTEX.
for undirected graph, you only need to set e_type_set and indegree
Maturity:
Production

Publications:
NA
Description:
Compute degree Centrality for each VERTEX.
for undirected graph, you only need to set e_type_set and indegree

TigerGraph Documentation:
https://docs.tigergraph.com/graph-ml/current/centrality-algorithms/degree-centrality
Publications:
NA

Parameters:
v_type_set:
vertex types to traverse
e_type_set:
edge types to traverse
reverse_e_type_set:
for indegree use
in_degree:
If True, count incoming relationships
out_degree:
If True, count outcoming relationships
top_k:
report only this many top scores
print_results:
If True, print the result
result_attribute:
attribute to write result to
file_path:
file to write CSV output to
TigerGraph Documentation:
https://docs.tigergraph.com/graph-ml/current/centrality-algorithms/degree-centrality

Parameters:
v_type_set:
vertex types to traverse
e_type_set:
edge types to traverse
reverse_e_type_set:
for indegree use
in_degree:
If True, count incoming relationships
out_degree:
If True, count outcoming relationships
top_k:
report only this many top scores
print_results:
If True, print the result
result_attribute:
attribute to write result to
file_path:
file to write CSV output to
normailize:
If True, return the normalized centrality. Default: True
*/

TYPEDEF TUPLE<VERTEX Vertex_ID, FLOAT score> Vertex_Score;
HeapAccum<Vertex_Score>(top_k, score DESC) @@top_scores_heap;
SumAccum<INT> @sum_degree_score;
SumAccum<DOUBLE> @sum_degree_score;
FILE f (file_path);

all = {v_type_set};
sll = SELECT s
FROM all:s
ACCUM IF in_degree THEN
FOREACH edge_type in reverse_e_type_set DO
s.@sum_degree_score+=s.outdegree(edge_type)
END
END,
IF out_degree THEN
FOREACH edge_type in e_type_set DO
s.@sum_degree_score+=s.outdegree(edge_type)
END
END;
ACCUM
IF in_degree THEN
s.@sum_degree_score += s.outdegree(reverse_e_type_set)
END,
IF out_degree THEN
s.@sum_degree_score += s.outdegree(e_type_set)
END
POST-ACCUM
IF normalize THEN
s.@sum_degree_score = s.@sum_degree_score / (all.size() - 1)
END;

#Output
IF file_path != "" THEN
f.println("Vertex_ID", "Degree");
Expand Down
Loading
Loading