utils#

box#

class aiearth.predict.utils.box.Box(xmin, ymin, xmax, ymax)[源代码]#

基类:object

classmethod from_bounds(bounds)[源代码]#
classmethod from_window(window: rasterio.windows.Window)[源代码]#
classmethod from_xywh(x, y, width, height)[源代码]#
get_height()[源代码]#
get_width()[源代码]#
set_height(height)[源代码]#
set_width(width)[源代码]#
subtract_origin(extent: Box)[源代码]#
to_bounds()[源代码]#
to_polygon()[源代码]#
to_window()[源代码]#
to_xywh()[源代码]#
translate(dx: int, dy: int)[源代码]#

chunk#

aiearth.predict.utils.chunk.get_chunk_windows(extent: Box, chunk_size)[源代码]#

file_io#

aiearth.predict.utils.file_io.remove_files(files: str | List[str])[源代码]#

merge_shape#

aiearth.predict.utils.merge_shape.merge_shapes(*args, **kwargs)#

A remote function.

This is a decorated function. It can be used to spawn tasks.

aiearth.predict.utils.merge_shape._language#

The target language.

aiearth.predict.utils.merge_shape._function#

The original function.

aiearth.predict.utils.merge_shape._function_descriptor#

The function descriptor. This is not defined until the remote function is first invoked because that is when the function is pickled, and the pickled function is used to compute the function descriptor.

aiearth.predict.utils.merge_shape._function_name#

The module and function name.

aiearth.predict.utils.merge_shape._num_cpus#

The default number of CPUs to use for invocations of this remote function.

aiearth.predict.utils.merge_shape._num_gpus#

The default number of GPUs to use for invocations of this remote function.

aiearth.predict.utils.merge_shape._memory#

The heap memory request in bytes for this task/actor, rounded down to the nearest integer.

aiearth.predict.utils.merge_shape._resources#

The default custom resource requirements for invocations of this remote function.

aiearth.predict.utils.merge_shape._num_returns#

The default number of return values for invocations of this remote function.

aiearth.predict.utils.merge_shape._max_calls#

The number of times a worker can execute this function before exiting.

aiearth.predict.utils.merge_shape._max_retries#

The number of times this task may be retried on worker failure.

aiearth.predict.utils.merge_shape._retry_exceptions#

Whether application-level errors should be retried. This can be a boolean or a list/tuple of exceptions that should be retried.

aiearth.predict.utils.merge_shape._runtime_env#

The runtime environment for this task.

aiearth.predict.utils.merge_shape._decorator#

An optional decorator that should be applied to the remote function invocation (as opposed to the function execution) before invoking the function. The decorator must return a function that takes in two arguments (“args” and “kwargs”). In most cases, it should call the function that was passed into the decorator and return the resulting ObjectRefs. For an example, see “test_decorated_function” in “python/ray/tests/test_basic.py”.

aiearth.predict.utils.merge_shape._function_signature#

The function signature.

aiearth.predict.utils.merge_shape._last_export_session_and_job#

A pair of the last exported session and job to help us to know whether this function was exported. This is an imperfect mechanism used to determine if we need to export the remote function again. It is imperfect in the sense that the actor class definition could be exported multiple times by different workers.

aiearth.predict.utils.merge_shape._scheduling_strategy#

Strategy about how to schedule this remote function.

PublicAPI: This API is stable across Ray releases.

merge_tiff#

aiearth.predict.utils.merge_tiff.merge_tiffs(*args, **kwargs)#

A remote function.

This is a decorated function. It can be used to spawn tasks.

aiearth.predict.utils.merge_tiff._language#

The target language.

aiearth.predict.utils.merge_tiff._function#

The original function.

aiearth.predict.utils.merge_tiff._function_descriptor#

The function descriptor. This is not defined until the remote function is first invoked because that is when the function is pickled, and the pickled function is used to compute the function descriptor.

aiearth.predict.utils.merge_tiff._function_name#

The module and function name.

aiearth.predict.utils.merge_tiff._num_cpus#

The default number of CPUs to use for invocations of this remote function.

aiearth.predict.utils.merge_tiff._num_gpus#

The default number of GPUs to use for invocations of this remote function.

aiearth.predict.utils.merge_tiff._memory#

The heap memory request in bytes for this task/actor, rounded down to the nearest integer.

aiearth.predict.utils.merge_tiff._resources#

The default custom resource requirements for invocations of this remote function.

aiearth.predict.utils.merge_tiff._num_returns#

The default number of return values for invocations of this remote function.

aiearth.predict.utils.merge_tiff._max_calls#

The number of times a worker can execute this function before exiting.

aiearth.predict.utils.merge_tiff._max_retries#

The number of times this task may be retried on worker failure.

aiearth.predict.utils.merge_tiff._retry_exceptions#

Whether application-level errors should be retried. This can be a boolean or a list/tuple of exceptions that should be retried.

aiearth.predict.utils.merge_tiff._runtime_env#

The runtime environment for this task.

aiearth.predict.utils.merge_tiff._decorator#

An optional decorator that should be applied to the remote function invocation (as opposed to the function execution) before invoking the function. The decorator must return a function that takes in two arguments (“args” and “kwargs”). In most cases, it should call the function that was passed into the decorator and return the resulting ObjectRefs. For an example, see “test_decorated_function” in “python/ray/tests/test_basic.py”.

aiearth.predict.utils.merge_tiff._function_signature#

The function signature.

aiearth.predict.utils.merge_tiff._last_export_session_and_job#

A pair of the last exported session and job to help us to know whether this function was exported. This is an imperfect mechanism used to determine if we need to export the remote function again. It is imperfect in the sense that the actor class definition could be exported multiple times by different workers.

aiearth.predict.utils.merge_tiff._scheduling_strategy#

Strategy about how to schedule this remote function.

PublicAPI: This API is stable across Ray releases.

package#

class aiearth.predict.utils.package.Package[源代码]#

基类:object

static unzip(package_path, target_dir, **kwargs)[源代码]#
static zip_directory(directory, output_path, excludes=[], **kwargs)[源代码]#
static zip_files(files: str | List[str], output_path, **kwargs)[源代码]#

pad_bounds#

class aiearth.predict.utils.pad_bounds.PadBounds(top, bottom, left, right)[源代码]#

基类:object

polygonization#

aiearth.predict.utils.polygonization.Polygonization[源代码]#

<aiearth.predict.utils.polygonization.ActorClass(Polygonization) object> 的别名

tiff_predict_writter#

aiearth.predict.utils.tiff_predict_writter.TiffPredictWritter[源代码]#

<aiearth.predict.utils.tiff_predict_writter.ActorClass(TiffPredictWritter) object> 的别名