Skip to content

Commit

Permalink
update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
oaksharks committed May 16, 2023
1 parent 6c535ef commit 85b6159
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="docs/source/images/Hypernets.png" width="500" >
<img src="https://raw.githubusercontent.com/DataCanvasIO/Hypernets/master/docs/source/images/Hypernets.png" width="500" >


[![Python Versions](https://img.shields.io/pypi/pyversions/hypernets.svg)](https://pypi.org/project/hypernets)
Expand All @@ -19,12 +19,12 @@ We introduced an abstract search space representation, taking into account the r
## Overview
### Conceptual Model
<p align="center">
<img src="docs/source/images/hypernets_conceptual_model.png" width="100%"/>
<img src="https://raw.githubusercontent.com/DataCanvasIO/Hypernets/master/docs/source/images/hypernets_conceptual_model.png" width="100%"/>
</p>

### Illustration of the Search Space
<p align="center">
<img src="docs/source/images/hypernets_search_space.png" width="100%"/>
<img src="https://raw.githubusercontent.com/DataCanvasIO/Hypernets/master/docs/source/images/hypernets_search_space.png" width="100%"/>
</p>

## What's NEW !
Expand Down Expand Up @@ -107,7 +107,7 @@ python -m hypernets.examples.smoke_testing
* [Cooka](https://github.com/DataCanvasIO/Cooka): Lightweight interactive AutoML system.


![DataCanvas AutoML Toolkit](docs/source/images/DAT_logo.png)
![DataCanvas AutoML Toolkit](https://raw.githubusercontent.com/DataCanvasIO/Hypernets/master/docs/source/images/DAT_logo.png)

## Citation

Expand Down
2 changes: 1 addition & 1 deletion hypernets/tests/experiment/experiment_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


def _create_experiment(predefined_kwargs, maker=None, need_test=False, user_kwargs=None):
df = dsutils.load_boston()
df = dsutils.load_boston().head(1000)
df['Constant'] = [0 for i in range(df.shape[0])]
df['Id'] = [i for i in range(df.shape[0])]
target = 'target'
Expand Down
49 changes: 27 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,32 @@ def read_extra_requirements():
return extra


def read_description(file_path='README.md',
image_root=f'{home_url}/raw/main'):
import re
import os

def _encode_image(m):
assert len(m.groups()) == 3

pre, src, post = m.groups()
src = src.rstrip().lstrip()
remote_src = os.path.join(image_root, os.path.relpath(src))
return f'{pre}{remote_src}{post}'

desc = open(file_path, encoding='utf-8').read()

# substitute html image
desc = re.sub(r'(<img\s+src\s*=\s*\")(docs/source/images/[^"]+)(\")', _encode_image, desc)

# substitute markdown image
desc = re.sub(r'(\!\[.*\]\()(docs/source/images/.+)(\))', _encode_image, desc)

# def read_description(file_path='README.md',
# image_root=f'{home_url}/raw/main'):
# import re
# import os
#
# def _encode_image(m):
# assert len(m.groups()) == 3
#
# pre, src, post = m.groups()
# src = src.rstrip().lstrip()
# remote_src = os.path.join(image_root, os.path.relpath(src))
# return f'{pre}{remote_src}{post}'
#
# desc = open(file_path, encoding='utf-8').read()
#
# # substitute html image
# desc = re.sub(r'(<img\s+src\s*=\s*\")(docs/source/images/[^"]+)(\")', _encode_image, desc)
#
# # substitute markdown image
# desc = re.sub(r'(\!\[.*\]\()(docs/source/images/.+)(\))', _encode_image, desc)
#
# return desc

def read_description(file_path='README.md'):
with open(file_path, encoding='utf-8') as f:
desc = f.read()
return desc


Expand All @@ -83,7 +88,7 @@ def _encode_image(m):
description='An General Automated Machine Learning Framework',
long_description=long_description,
long_description_content_type="text/markdown",
url='',
url='https://github.com/DataCanvasIO/Hypernets',
author='DataCanvas Community',
author_email='yangjian@zetyun.com',
license='Apache License 2.0',
Expand Down

0 comments on commit 85b6159

Please sign in to comment.