Skip to content

Commit

Permalink
Merge pull request #118 from marieai/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
gregbugaj authored Aug 30, 2024
2 parents c98b063 + c62aed2 commit deb20c9
Show file tree
Hide file tree
Showing 69 changed files with 5,336 additions and 1,036 deletions.
1 change: 1 addition & 0 deletions .github/release-template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
name: 'perf',
show: true,
list: []
}, {
name: 'fix',
show: true,
Expand Down
33 changes: 33 additions & 0 deletions .run/marie ctl.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="marie ctl" type="PythonConfigurationType" factoryName="Python">
<module name="marie-ai" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
<env name="COLUMNS" value="120" />
<env name="CUDA_VISIBLE_DEVICES" value="-1" />
<env name="MARIE_CACHE_LOCK_TIMEOUT" value="10" />
<env name="MARIE_DEBUG" value="0" />
<env name="MARIE_DEBUG_PORT" value="5678" />
<env name="MARIE_DEFAULT_MOUNT" value="/mnt/data/marie-ai" />
<env name="XXXXJINA_MP_START_METHOD" value="fork" />
<env name="GRPC_VERBOSITY" value="debug" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="false" />
<option name="ADD_SOURCE_ROOTS" value="false" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/marie/__main__.py" />
<option name="PARAMETERS" value="ctl --watch" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>
5 changes: 2 additions & 3 deletions README-GB.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ https://github.com/NielsRogge/Transformers-Tutorials/blob/master/Table%20Transfo
dedoc
https://github.com/ispras/dedoc/blob/master/dedoc/structure_constructors/abstract_structure_constructor.py

PDF-Extract-Kit
https://github.com/opendatalab/PDF-Extract-Kit?tab=readme-ov-file

https://cloud.google.com/document-ai

Expand Down Expand Up @@ -517,9 +519,6 @@ pydantic_core 2.10.1
```





# Rewriting history

```bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package co.marieai.model

import sun.jvm.hotspot.debugger.cdbg.TemplateType

/**
* Represents a bounding box with its coordinates and dimensions.
Expand Down
4 changes: 3 additions & 1 deletion extra-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,6 @@ sahi: standard,core
clip: standard,core
efficientnet-pytorch: standard,core
seaborn: standard,core

textual: standard,core
textual_textarea: standard,core
textual_fastdatatable: standard,core
5 changes: 3 additions & 2 deletions marie/clients/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ async def _get_results(*args, **kwargs):
if return_responses:
result.append(resp)
else:
result.extend(resp.data.docs)
result.extend(resp.docs)
if return_results:
if not return_responses and is_singleton and len(result) == 1:
return result[0]
Expand All @@ -437,6 +437,7 @@ async def _get_results(*args, **kwargs):
results_in_order=results_in_order,
stream=stream,
prefetch=prefetch,
return_type=return_type,
on=on,
**kwargs,
)
Expand Down Expand Up @@ -537,7 +538,7 @@ async def post(
is_singleton = True
result.document_array_cls = DocList[return_type]
if not return_responses:
ret_docs = result.data.docs
ret_docs = result.docs
if is_singleton and len(ret_docs) == 1:
yield ret_docs[0]
else:
Expand Down
28 changes: 26 additions & 2 deletions marie/parsers/server.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Argparser module for server"""

from marie.parsers.base import set_base_parser
from marie.parsers.helper import KVAppendAction, add_arg_group
from marie.parsers.helper import KVAppendAction, _chf, add_arg_group


def set_server_parser(parser=None):
Expand All @@ -13,8 +13,32 @@ def set_server_parser(parser=None):
if not parser:
parser = set_base_parser()

gp = add_arg_group(parser, title='Server Feature')
sp = parser.add_subparsers(
dest='ctl_cli',
required=True,
)

watch_parser = sp.add_parser(
'watch',
description='Watch the server deployments in real-time',
formatter_class=_chf,
)

watch_parser.add_argument(
'--etcd-host',
type=str,
help='The host address of etcd server to watch',
)

watch_parser.add_argument(
'--etcd-port',
type=str,
help='The port of etcd server to watch',
)

# return parser

gp = add_arg_group(parser, title='Server Feature')
gp.add_argument(
'--start',
action='store_true',
Expand Down
3 changes: 3 additions & 0 deletions marie/resources/extra-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,6 @@ sahi: standard,core
clip: standard,core
efficientnet-pytorch: standard,core
seaborn: standard,core
textual: standard,core
textual_textarea: standard,core
textual_fastdatatable: standard,core
2 changes: 1 addition & 1 deletion marie/resources/logging.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ handlers: # enabled handlers, order does not matter
# - StreamHandler
# - FileHandler
- RichHandler
level: DEBUG # set verbose level
level: INFO # set verbose level
configs:
FileHandler:
format: '%(asctime)s:{name:>15}@%(process)2d[%(levelname).1s]:%(message)s'
Expand Down
Loading

0 comments on commit deb20c9

Please sign in to comment.