Skip to content

Commit

Permalink
Add name property
Browse files Browse the repository at this point in the history
remove property

Add name property
  • Loading branch information
kramstrom committed Jan 20, 2025
1 parent 49d9846 commit 5b5abe4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
5 changes: 0 additions & 5 deletions modal/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,11 +1105,6 @@ async def lookup(
await resolver.load(obj)
return obj

@property
def name(self) -> str:
assert self._function_name
return self._function_name

@property
def tag(self) -> str:
"""mdmd:hidden"""
Expand Down
2 changes: 1 addition & 1 deletion modal/parallel_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async def pump_inputs():
if err.status != Status.RESOURCE_EXHAUSTED:
raise err
logger.warning(
f"Warning: map progress for function {function.function_name} is limited."
f"Warning: map progress for function {function._function_name} is limited."
" Common bottlenecks include slow iteration over results, or function backlogs."
)

Expand Down
1 change: 0 additions & 1 deletion test/function_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def test_run_function(client, servicer):
with app.run(client=client):
assert foo.remote(2, 4) == 20
assert len(servicer.cleared_function_calls) == 1
assert foo.function_name == "foo"


@pytest.mark.asyncio
Expand Down

0 comments on commit 5b5abe4

Please sign in to comment.