Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/close markets #77

Merged
merged 9 commits into from
Dec 22, 2023
Merged

Feat/close markets #77

merged 9 commits into from
Dec 22, 2023

Conversation

0xArdi
Copy link
Collaborator

@0xArdi 0xArdi commented Dec 21, 2023

This PR adds support for autonomously closing the markets.

# Conflicts:
#	packages/packages.json
#	packages/valory/agents/market_maker/aea-config.yaml
#	packages/valory/services/market_maker/service.yaml
#	packages/valory/skills/market_creation_manager_abci/payloads.py
#	packages/valory/skills/market_creation_manager_abci/skill.yaml
#	packages/valory/skills/market_maker_abci/skill.yaml
NO_TX = "no_tx"
ERROR_PAYLOAD = "error"

def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Enum]]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to call super() here instead of re-write the method?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think so, we have custom logic

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please @Adamantios take a look.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would just mean moving the logic from here to the base class. Which i don't see what the point is in doing that right now, we are not reusing this.

prompt_template = self.params.market_identification_prompt
prompt_values = {
"input_news": input_news,
"topics": topics,
"event_day": event_day.strftime("%-d %B %Y"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why delete "topics" ?? This is required in the prompt on self.params.market_identification_prompt

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On accident, will revert

continue
question_to_answer[question["question"]["id"]] = answer

if len(question_to_answer) == self.params.num_questions_to_close:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this doing ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Limiting the number of questions we answer at once.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, the name is a bit misleading, i thougt it was the total number of questions to answer overall.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll rename to questions_to_close_batch_size, ok?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@0xArdi 0xArdi merged commit 18dd291 into main Dec 22, 2023
6 checks passed
@0xArdi 0xArdi deleted the feat/close-markets branch December 22, 2023 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants