mirror of
https://github.com/clearml/clearml
synced 2025-04-09 23:24:31 +00:00
Fix docstring
This commit is contained in:
parent
0b0fd55329
commit
2aba12cf52
@ -3632,7 +3632,8 @@ class PipelineDecorator(PipelineController):
|
|||||||
:param args_map: Map arguments to their specific configuration section. Arguments not included in this map
|
:param args_map: Map arguments to their specific configuration section. Arguments not included in this map
|
||||||
will default to `Args` section. For example, for the following code:
|
will default to `Args` section. For example, for the following code:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: py
|
||||||
|
|
||||||
@PipelineDecorator.pipeline(args_map={'sectionA':['paramA'], 'sectionB:['paramB','paramC']
|
@PipelineDecorator.pipeline(args_map={'sectionA':['paramA'], 'sectionB:['paramB','paramC']
|
||||||
def executing_pipeline(paramA, paramB, paramC, paramD):
|
def executing_pipeline(paramA, paramB, paramC, paramD):
|
||||||
pass
|
pass
|
||||||
@ -3965,7 +3966,7 @@ class PipelineDecorator(PipelineController):
|
|||||||
Add support for multiple pipeline function calls,
|
Add support for multiple pipeline function calls,
|
||||||
enabling execute multiple instances of the same pipeline from a single script.
|
enabling execute multiple instances of the same pipeline from a single script.
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: py
|
||||||
|
|
||||||
@PipelineDecorator.pipeline(
|
@PipelineDecorator.pipeline(
|
||||||
multi_instance_support=True, name="custom pipeline logic", project="examples", version="1.0")
|
multi_instance_support=True, name="custom pipeline logic", project="examples", version="1.0")
|
||||||
|
@ -416,6 +416,7 @@ class Task(_Task):
|
|||||||
}
|
}
|
||||||
|
|
||||||
.. code-block:: py
|
.. code-block:: py
|
||||||
|
|
||||||
auto_connect_frameworks={'tensorboard': {'report_hparams': False}}
|
auto_connect_frameworks={'tensorboard': {'report_hparams': False}}
|
||||||
|
|
||||||
:param bool auto_resource_monitoring: Automatically create machine resource monitoring plots
|
:param bool auto_resource_monitoring: Automatically create machine resource monitoring plots
|
||||||
|
@ -30,7 +30,7 @@ class MultipartEncoder(object):
|
|||||||
|
|
||||||
The basic usage is:
|
The basic usage is:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: py
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from requests_toolbelt import MultipartEncoder
|
from requests_toolbelt import MultipartEncoder
|
||||||
@ -43,7 +43,7 @@ class MultipartEncoder(object):
|
|||||||
If you do not need to take advantage of streaming the post body, you can
|
If you do not need to take advantage of streaming the post body, you can
|
||||||
also do:
|
also do:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: py
|
||||||
|
|
||||||
r = requests.post('https://httpbin.org/post',
|
r = requests.post('https://httpbin.org/post',
|
||||||
data=encoder.to_string(),
|
data=encoder.to_string(),
|
||||||
@ -52,7 +52,7 @@ class MultipartEncoder(object):
|
|||||||
If you want the encoder to use a specific order, you can use an
|
If you want the encoder to use a specific order, you can use an
|
||||||
OrderedDict or more simply, a list of tuples:
|
OrderedDict or more simply, a list of tuples:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: py
|
||||||
|
|
||||||
encoder = MultipartEncoder([('field', 'value'),
|
encoder = MultipartEncoder([('field', 'value'),
|
||||||
('other_field', 'other_value')])
|
('other_field', 'other_value')])
|
||||||
@ -62,7 +62,7 @@ class MultipartEncoder(object):
|
|||||||
You can also provide tuples as part values as you would provide them to
|
You can also provide tuples as part values as you would provide them to
|
||||||
requests' ``files`` parameter.
|
requests' ``files`` parameter.
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: py
|
||||||
|
|
||||||
encoder = MultipartEncoder({
|
encoder = MultipartEncoder({
|
||||||
'field': ('file_name', b'{"a": "b"}', 'application/json',
|
'field': ('file_name', b'{"a": "b"}', 'application/json',
|
||||||
@ -333,7 +333,7 @@ class MultipartEncoderMonitor(object):
|
|||||||
To use this monitor, you construct your :class:`MultipartEncoder` as you
|
To use this monitor, you construct your :class:`MultipartEncoder` as you
|
||||||
normally would.
|
normally would.
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: py
|
||||||
|
|
||||||
from requests_toolbelt import (MultipartEncoder,
|
from requests_toolbelt import (MultipartEncoder,
|
||||||
MultipartEncoderMonitor)
|
MultipartEncoderMonitor)
|
||||||
@ -352,7 +352,7 @@ class MultipartEncoderMonitor(object):
|
|||||||
Alternatively, if your use case is very simple, you can use the following
|
Alternatively, if your use case is very simple, you can use the following
|
||||||
pattern.
|
pattern.
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: py
|
||||||
|
|
||||||
from requests_toolbelt import MultipartEncoderMonitor
|
from requests_toolbelt import MultipartEncoderMonitor
|
||||||
import requests
|
import requests
|
||||||
@ -585,7 +585,8 @@ class FileFromURLWrapper(object):
|
|||||||
You can use the :class:`FileFromURLWrapper` without a session or with
|
You can use the :class:`FileFromURLWrapper` without a session or with
|
||||||
a session as demonstated by the examples below:
|
a session as demonstated by the examples below:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: py
|
||||||
|
|
||||||
# no session
|
# no session
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
@ -602,7 +603,8 @@ class FileFromURLWrapper(object):
|
|||||||
headers={'Content-Type': streaming_encoder.content_type}
|
headers={'Content-Type': streaming_encoder.content_type}
|
||||||
)
|
)
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: py
|
||||||
|
|
||||||
# using a session
|
# using a session
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
Loading…
Reference in New Issue
Block a user