Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ We have provided the hyper-parameters of some models to achieve the state-of-the

<strong> We are still trying more hyper-parameters and more training strategies (e.g., adversarial training and label smoothing regularization) for these models. </strong> Hence, this table is still in change. We welcome everyone to help us update this table and hyper-parameters.

## Pip Install

``` sh
./build.sh # build wheel file
pip install openke_***.whl # install
```

## Installation

Expand Down
6 changes: 6 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
python setup.py bdist_wheel -d ./

rm -rf *.so
rm -rf *.egg-info
rm -rf build
rm -rf dist
29 changes: 29 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from setuptools import setup, find_packages, Extension

version = '0.1.0'

# g++ ./base/Base.cpp -fPIC -shared -o Base.so -pthread -O3 -march=native

setup(
name="openke",
version=version,
license='MIT',
description='Pytorch Wrapper of C++ OpenKE-PyTorch',
author='thunlp',
url='https://github.com/thunlp/OpenKE',
packages=find_packages(),
ext_modules=[
Extension(
'base',
extra_compile_args=["-fPIC", "-shared", "-pthread", "-O3", "-march=native"],
extra_link_args=["-o", "OpenKEBase.so"],
sources=['./openke/base/Base.cpp']
)
],
data_files=[('lib', ['OpenKEBase.so'])],
install_requires=[
'numpy==1.16.4',
'scipy',
'torch==1.2.0'
],
)