Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c0d28da
refactor: v0.0.3, env is prod
varuy322 Nov 11, 2022
a9bd621
update version to 0.0.3
su-pjlab Nov 11, 2022
f1ab4ad
fix malfunction of search method
Feb 23, 2023
d8b054f
version number move to 0.0.4
Feb 27, 2023
630a285
dev branch first commit, modified gitignore
Mar 2, 2023
2eb620a
remove oss2 dependency, introduce parfive
Mar 7, 2023
22e9ef6
remove parfive dependency, introduce request based resumable download…
Mar 8, 2023
3703cfc
remove dependency of parfive, introduce brand new multi-threading & r…
Mar 10, 2023
72a48f9
remove redundancy
Mar 10, 2023
1478914
revise donwload directory
Mar 17, 2023
7f4f9f5
fix boader issue and update user panel
Mar 17, 2023
fb3af22
update version
Mar 20, 2023
18f57ff
fix dependency problem
Mar 20, 2023
cadf1f0
fix cmd ls -h display layout
Mar 22, 2023
f27819a
add risk level
Apr 4, 2023
38ff605
add authorization before downloading
Apr 6, 2023
2e78d57
update readme and uncomment some prints
Apr 18, 2023
841644a
fix malfunction under introduce of dsdl path
Apr 20, 2023
588e3bd
not showing detailed download info
Apr 25, 2023
ffe5d10
for product
Apr 28, 2023
8ce8717
publish as 0.0.7
Apr 28, 2023
a1c29e3
fix single file download error
May 11, 2023
b1cf662
fix some display error
May 11, 2023
fd375c4
move version to 0.0.8
May 11, 2023
a2dd751
fix README.md download error
May 12, 2023
e361cf9
fix several datasets download error
May 18, 2023
ab9285a
move version to 0.0.9
May 18, 2023
ac868b1
add: deprecation warning msg, add openxlab into dependency
Aug 1, 2023
a2ecca0
Update __version__.py
waynesapphire Aug 1, 2023
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
ILSVRC2012_Images

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -81,6 +82,7 @@ target/
# IPython
profile_default/
ipython_config.py
tutorial.ipynb

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ Commands:
### Version
```cmd
$ odl version
odl version, current: 0.0.2, svc: 1.8
odl version, current: 0.0.6, svc: 1.8
```

### Login
Login with opendatalab username and password. If you haven't an opendatalab account,please register with link: https://opendatalab.org.cn/

```cmd
$ odl login
Username []: [email protected]
Username []: [email protected]
Password []:
Login successfully as [email protected]
Login successfully as [email protected]
or
$ odl login -u [email protected]
$ odl login -u [email protected]
Password[]:
```

Expand All @@ -77,7 +77,7 @@ Logout current opendatalab account
```cmd
$ odl logout
Do you want to logout? [y/N]: y
[email protected].com logout
someone@example.com logout
```


Expand Down Expand Up @@ -178,4 +178,4 @@ if __name__ == '__main__':
```

## Documentation
More information can be found on the [documentation site](https://opendatalab.org.cn/docs)
More information can be found on the [documentation site](https://opendatalab.org.cn/docs)
5 changes: 2 additions & 3 deletions opendatalab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

"""OpenDataLab python SDK."""

from opendatalab.__version__ import __version__
from opendatalab.__version__ import __url__
from opendatalab.__version__ import __url__, __version__
from opendatalab.client.client import Client

__all__ = ["__url__", "__version__", "Client"]
__all__ = ["__url__", "__version__", "Client"]
5 changes: 3 additions & 2 deletions opendatalab/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"""OpenDataLab python SDK version info."""

__url__ = "https://opendatalab.org.cn"
__version__ = "0.0.2"
__svc__ = '1.8'
__version__ = "0.0.10"
__svc__ = '2.0'
odl_clientId = "kmz3bkwzlaa3wrq8pvwa"
uaa_url_prefix = "https://sso.openxlab.org.cn/gw/uaa-be"
# clientSecret: 97gdrvwwzob86q2rneq2x95w6bnxkpqj5oak1ype
41 changes: 18 additions & 23 deletions opendatalab/cli/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import click

from opendatalab.__version__ import __version__, __url__, __svc__
from opendatalab.__version__ import __svc__, __url__, __version__
from opendatalab.cli.custom import CustomCommand
from opendatalab.cli.utility import ContextInfo

Expand Down Expand Up @@ -91,9 +91,7 @@ def login(obj: ContextInfo, username: str, password: str):
implement_login(obj, username, password)


@command(synopsis=(
"$ odl ls dataset # list dataset files",
"$ odl ls dataset/sub_dir # list dataset/sub_dir files",))
@command(synopsis=("$ odl ls dataset # list dataset files",))
@click.argument("name", nargs=1)
@click.pass_obj
def ls(obj: ContextInfo, name: str) -> None:
Expand Down Expand Up @@ -121,7 +119,7 @@ def search(obj: ContextInfo, keywords):
implement_search(obj, keywords)


@command(synopsis=("$ odl info dataset_name # show dataset info.",))
@command(synopsis=("$ odl info dataset_name # show dataset info",))
@click.argument("name", nargs=1)
@click.pass_obj
def info(obj: ContextInfo, name):
Expand All @@ -137,33 +135,30 @@ def info(obj: ContextInfo, name):
@command(synopsis=("$ odl get dataset_name # get dataset files into local",))
@click.argument("name", nargs=1)
@click.option(
"--thread",
"-t",
default=8,
help="Number of thread for download",
show_default=True,
"--dest",
"-d",
default='',
help="Desired dataset store path",
show_default=True
)
@click.option(
"--limit_speed",
"-l",
default=0,
help="Download limit speed: KB/s, 0 is unlimited",
show_default=True,
"--workers",
"-w",
default = 8,
help= "number of workers",
show_default = True
)
@click.pass_obj
def get(obj: ContextInfo, name, thread, limit_speed):
def get(obj: ContextInfo, name, dest, workers):
"""Get(Download) dataset files into local path.\f

Args:
obj (ContextInfo): context info\f
name (str): dataset name\f
thread (int): multi-thread number\f
limit_speed (int): limit download speed, for not limit set value to 0
destination(str): desired dataset store path\f
wokers(str): number of workers\f
"""

from opendatalab.cli.get import implement_get
implement_get(obj, name, thread, limit_speed)


implement_get(obj, name, dest, workers)
if __name__ == "__main__":
cli()
Loading