Skip to main content

Unit Test & Deploy

import networkx as nx
import gravlearn as gn
import torch

# Load data
G = nx.karate_club_graph()
A = nx.adjacency_matrix(G)
labels = [G.nodes[i]["club"] for i in G.nodes]

# Generate the sequence for demo
sampler = gn.RandomWalkSampler(A, walk_length=40, p=1, q=1)
walks = [sampler.sampling(i) for _ in range(10) for i in range(A.shape[0])]

# Training
model = gravlearn.Word2Vec(A.shape[0], 32) # Embedding based on set

dist_metric = gravlearn.DistanceMetrics.EUCLIDEAN
model = gravlearn.train(model, walks, device = device, bags =A ,window_length=5, dist_metric=dist_metric)

# Embedding
emb = model.forward(torch.arange(A.shape[0]))

Metadata

Release files for gravlearn 0.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for gravlearn 0.0.10
File Interpreter ABI Platform Actions
gravlearn-0.0.10-py3-none-any.whl Python 3 none any Details for gravlearn-0.0.10-py3-none-any.whl

Release files / gravlearn-0.0.10-py3-none-any.whl

Download URL gravlearn-0.0.10-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a3d0fcdf27ce8534b07a506e99fb18fed8594beb1502b3b1be38cfb4af4dc9a
BLAKE2b-256 checksum
How to use checksums
ff722f6c6647c7547eff841f2cca6bc827b01db0ec7393d3b8523ee2baf9ad0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for gravlearn 0.0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page