Skip to content

Commit

Permalink
:return: -> :returns
Browse files Browse the repository at this point in the history
  • Loading branch information
yonishelach committed Jun 7, 2023
1 parent f1937e4 commit b4404e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/data_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def get_html_as_string(url: str, mark_headers: bool) -> str:
:param url: html URL
:param mark_headers: Whether to add article and header prefixes to headers to text
:return: html text content
:returns: html text content
"""
# read html source:
req = Request(url=url, headers={"User-Agent": "Mozilla/5.0"})
Expand All @@ -200,7 +200,7 @@ def collect_html_to_text_files(urls, mark_headers=True) -> str:
:param urls: html URLs
:param mark_headers: Whether to add article and header prefixes to headers to text
:return: the directory name that contains all the content text files.
:returns: the directory name that contains all the content text files.
"""
directory = "html_as_text_files"
os.makedirs(directory, exist_ok=True)
Expand Down
4 changes: 2 additions & 2 deletions src/data_preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def convert_textfile_to_data_with_prompts(txt_file: Path):
Each header-content in the article is an element in the generated list of prompts
:param txt_file: text content as a string with tokens of headers.
:return: list of prompts
:returns: list of prompts
"""
# Read file:
with open(txt_file, "r") as f:
Expand Down Expand Up @@ -69,7 +69,7 @@ def prepare_dataset(source_dir: str):
:param source_dir: the directory that contains all the text files.
:return: A dataset with all the prompts inside
:returns: A dataset with all the prompts inside
"""
with zipfile.ZipFile(source_dir, "r") as zip_file:
tmp_dir = tempfile.mkdtemp()
Expand Down
2 changes: 1 addition & 1 deletion src/project_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def create_and_set_project(
:param num_cpus_per_replica: number of CPUs per worker
:param memory_per_replica: amount of memory per worker
:return: a fully prepared project for this demo.
:returns: a fully prepared project for this demo.
"""
# Get / Create a project from the MLRun DB:
project = mlrun.get_or_create_project(
Expand Down

0 comments on commit b4404e4

Please sign in to comment.