Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add CopyRight and add downloadscheme #10

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

wangguan1995
Copy link
Collaborator

No description provided.



def get_free_space_in_gb(local_dir):
# 获取磁盘使用情况
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For open-source SDK, English comments are more appropriate.

def get_free_space_in_gb(local_dir):
# 获取磁盘使用情况
usage = shutil.disk_usage(local_dir)
# 将字节转换为GB(使用1024^3作为1GB)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as mentioned

Copy link
Collaborator

@lijialin03 lijialin03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

辛苦先使用pre-commit检查代码格式和引用,删除或替换代码中的中文注释

from typing import Any, BinaryIO, Dict, Literal, NoReturn, Optional, Tuple, Union
import os
import subprocess
os.environ['WGET_USER_AGENT'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是老师的专有信息吗,如果是的话是不留一个接口让用户指定比较好

future.result() # 等待每个任务完成,并处理异常(如果有的话)


def dfc_hub_download(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在这个函数里增加type hints,说明各个参数的定义

max_workers=max_workers
)
std = time.time()
# 从DNNFluid-Car Hub下载数据集(使用1个并发进程)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

以下部分以DNNFluid-Car/DrivAerML为范例,可以写入README中或者在dfc_hub_download的type hints里增加Example部分

local_dir_subdir = local_dir / data.RUN_LOCAL_DIR
Path(local_dir_subdir).mkdir(parents=True, exist_ok=True)
file_types_list[0].append(['wget', '-c', '-O', (local_dir_subdir/ Path(f"force_mom_{data.INDEX}.csv",)).as_posix() , f"https://{data.MIRROR}/datasets/{data.HF_OWNER}/{data.HF_PREFIX}/resolve/main/{data.RUN_LOCAL_DIR.as_posix()}/force_mom_{data.INDEX}.csv"])
# 解除注释以下载更多数据
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以直接根据list长度判断吗

Copy link
Collaborator

@guhaohao0991 guhaohao0991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释修正与参数说明

force_filename: Optional[str] = None,
local_dir_use_symlinks: Union[bool, Literal["auto"]] = "auto",
max_workers: int = 5,
) -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

开放使用接口,提供args docs说明含义

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants