Remove scrapingh & fix broken links

This commit is contained in:
Andras Schmelczer 2022-07-13 13:07:23 +02:00
parent 489b9d19e2
commit 7a71510cca
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E
9 changed files with 31 additions and 146 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,104 +0,0 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import httpx\n",
"\n",
"transport = httpx.AsyncHTTPTransport(retries=2)\n",
"limits = httpx.Limits(max_connections=None)\n",
"timeout = httpx.Timeout(connect=60.0, read=300, write=60, pool=None)\n",
"async with httpx.AsyncClient(\n",
" transport=transport, limits=limits, timeout=timeout\n",
") as client:\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[38;5;226m2022-07-11 19:00:27 | WARNING | Environment variable ENVIRONMENT is not set, defaulting to development mode ‼️\u001b[0m\n",
"\u001b[38;5;226m2022-07-11 19:00:27 | WARNING | Cannot find credentials files, defaulting to using ParallelTinyDbDriver\u001b[0m\n",
"\u001b[38;5;226m2022-07-11 19:00:27 | WARNING | The selected tracing database (ParallelTinyDbDriver) is not recommended for production\u001b[0m\n",
"\u001b[38;5;226m2022-07-11 19:00:27 | WARNING | Cannot find credentials files, defaulting to using LargeFileLocal\u001b[0m\n",
"\u001b[38;5;39m2022-07-11 19:00:27 | INFO | GreatAI (v0.1.3): configured ✅\u001b[0m\n",
"\u001b[38;5;39m2022-07-11 19:00:27 | INFO | 🔩 tracing_database: ParallelTinyDbDriver\u001b[0m\n",
"\u001b[38;5;39m2022-07-11 19:00:27 | INFO | 🔩 large_file_implementation: LargeFileLocal\u001b[0m\n",
"\u001b[38;5;39m2022-07-11 19:00:27 | INFO | 🔩 is_production: False\u001b[0m\n",
"\u001b[38;5;39m2022-07-11 19:00:27 | INFO | 🔩 should_log_exception_stack: True\u001b[0m\n",
"\u001b[38;5;39m2022-07-11 19:00:27 | INFO | 🔩 prediction_cache_size: 512\u001b[0m\n",
"\u001b[38;5;39m2022-07-11 19:00:27 | INFO | 🔩 dashboard_table_size: 50\u001b[0m\n",
"\u001b[38;5;226m2022-07-11 19:00:27 | WARNING | You still need to check whether you follow all best practices before trusting your deployment.\u001b[0m\n",
"\u001b[38;5;226m2022-07-11 19:00:27 | WARNING | > Find out more at https://se-ml.github.io/practices\u001b[0m\n"
]
},
{
"data": {
"text/plain": [
"Trace[str]({'created': '2022-07-11T17:00:27.064568',\n",
" 'exception': None,\n",
" 'feedback': None,\n",
" 'logged_values': {'arg:your_name:length': 3, 'arg:your_name:value': 'Bob'},\n",
" 'models': [],\n",
" 'original_execution_time_ms': 0.0896,\n",
" 'output': 'Hi Bob',\n",
" 'tags': ['greeter', 'online', 'development'],\n",
" 'trace_id': '8ff5b268-2613-4e85-96ae-f248666a051f'})"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from great_ai import configure, RouteConfig\n",
"from great_ai import GreatAI\n",
"\n",
"\n",
"@GreatAI.create\n",
"def greeter(your_name: str) -> str:\n",
" return f\"Hi {your_name}\"\n",
"\n",
"\n",
"greeter(\"Bob\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.4 ('.env': venv)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "02dd6d3afbfa9fbbe1037d64ad9014965528a1ccad21929d6e72f466389a68ad"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}

View file

@ -10,10 +10,10 @@ Well-tested tools that can be used in production with confidence. The toolbox of
::: great_ai.utilities.clean ::: great_ai.utilities.clean
::: great_ai.utilities.get_sentences ::: great_ai.utilities.get_sentences
::: great_ai.utilities.predict_language ::: great_ai.utilities.language.predict_language
::: great_ai.utilities.is_english ::: great_ai.utilities.language.english_name_of_language
::: great_ai.utilities.english_name_of_language ::: great_ai.utilities.language.is_english
::: great_ai.utilities.evaluate_ranking ::: great_ai.utilities.evaluate_ranking.evaluate_ranking
## Parallel processing ## Parallel processing
@ -29,7 +29,7 @@ Multiprocessing and multithreading-based parallelism with support for `async` fu
## Composable parallel processing ## Composable parallel processing
Because both [threaded_parallel_map][great_ai.utilities.parallel_map.threaded_parallel_map.threaded_parallel_map] and [parallel_map][great_ai.utilities.parallel_map.parallel_map] have a streaming interface, it is easy to compose them and end up with, for example, a process for each CPU core with its own thread-pool or event-loop. Longer pipelines are also easy to imagine. The chunking methods help in these compositions. Because both [threaded_parallel_map][great_ai.utilities.parallel_map.threaded_parallel_map.threaded_parallel_map] and [parallel_map][great_ai.utilities.parallel_map.parallel_map.parallel_map] have a streaming interface, it is easy to compose them and end up with, for example, a process for each CPU core with its own thread-pool or event-loop. Longer pipelines are also easy to imagine. The chunking methods help in these compositions.
For more info, check-out [the scraping guide](/how-to-guides/scraping). For more info, check-out [the scraping guide](/how-to-guides/scraping).

View file

@ -190,7 +190,7 @@ class GreatAI(Generic[T, V]):
) -> List[Trace[V]]: ) -> List[Trace[V]]:
"""Map the wrapped function over a list of input_values (`batch`). """Map the wrapped function over a list of input_values (`batch`).
A wrapper over [parallel_map][great_ai.utilities.parallel_map] A wrapper over [parallel_map][great_ai.utilities.parallel_map.parallel_map.parallel_map]
providing type-safety and a progressbar through tqdm. providing type-safety and a progressbar through tqdm.
Args: Args:

View file

@ -66,7 +66,7 @@ def add_ground_truth(
train_split_ratio: The probability-weight of giving each trace the `train` tag. train_split_ratio: The probability-weight of giving each trace the `train` tag.
test_split_ratio: The probability-weight of giving each trace the `test` tag. test_split_ratio: The probability-weight of giving each trace the `test` tag.
validation_split_ratio: The probability-weight of giving each trace the validation_split_ratio: The probability-weight of giving each trace the
`validation` tag. `validation` tag.
""" """
inputs = list(inputs) inputs = list(inputs)

View file

@ -34,7 +34,7 @@ def get_sentences(
Args: Args:
text: Text to be segmented into sentences. text: Text to be segmented into sentences.
ignore_partial: Filter out sentences that are not capitalised/don't end with a ignore_partial: Filter out sentences that are not capitalised/don't end with a
punctuation. punctuation.
true_case: Crude method: lowercase the first word of each sentence. true_case: Crude method: lowercase the first word of each sentence.
remove_punctuation: Remove all kinds of punctuation. remove_punctuation: Remove all kinds of punctuation.

View file

@ -18,7 +18,7 @@ def english_name_of_language(language_code: Optional[str]) -> str:
Args: Args:
language_code: Language code, for example, returned by language_code: Language code, for example, returned by
[great_ai.utilities.predict_language][]. [great_ai.utilities.language.predict_language.predict_language][].
Returns: Returns:
English name of language. English name of language.

View file

@ -21,7 +21,7 @@ def is_english(language_code: Optional[str]) -> bool:
Args: Args:
language_code: Language code, for example, returned by language_code: Language code, for example, returned by
`[great_ai.utilities.predict_language][]. `[great_ai.utilities.language.predict_language.predict_language][].
Returns: Returns:
Boolean indicating whether it's English. Boolean indicating whether it's English.

View file

@ -101,7 +101,6 @@ nav:
- how-to-guides/handle-training-data.md - how-to-guides/handle-training-data.md
- how-to-guides/large_file.md - how-to-guides/large_file.md
- how-to-guides/call-remote.md - how-to-guides/call-remote.md
- how-to-guides/scraping.ipynb
- Reference: - Reference:
- reference/index.md - reference/index.md
- reference/utilities.md - reference/utilities.md