TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #400 · 8 дек.

Три способа выполнить множество задач с asyncio Функция для примера: async def do_it(n): await asyncio.sleep(random.uniform(0.5, 1)) return n 1. Последовательный вызов async def main(): for i in range(100): result = await do_it(i) Такой вызов имеет смысл только тогда, когда результат одной задачи требуется для вызова следующей. Если они независимы, то это антипаттерн, так как аналогичен простому синхронному вызову по очереди. 2. Упорядоченный результат async def main(): tasks = [do_it(i) for i in range(100)] results = await asyncio.gather(*tasks) Выполняет корутины конкурентно и возвращает результат в виде списка. Полезен когда требуется получить результаты в том же порядке в котором задачи отправлены. 3. Результат по мере готовности tasks = [asyncio.create_task(do_it(i)) for i in range(100)] for cor in asyncio.as_completed(tasks): result = await cor Так же выполняет корутины конкурентно, но не гарантирует порядок. Результат возвращается по мере готовности, каждый отдельно. Полезен когда нужно обработать любой ответ как можно скорее. #async

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #cmaaiprinciples

当前筛选 #cmaaiprinciples清除筛选
AI & Law

@ai_and_law · Post #124 · 27.09.2023 г., 07:04

UK: CMA Releases Principles for Responsible AI Development Hello, everyone! The Competition and Markets Authority (CMA) has unveiled a set of principles to ensure the responsible development and use of foundation models (FMs) in AI. Foundation models, like ChatGPT and Office 365 Copilot, are versatile AI systems poised to revolutionize various sectors. The CMA's report lays out these guiding principles, with a focus on safeguarding consumer protection and fostering healthy competition in the AI industry. As AI rapidly integrates into our daily lives, the CMA recognizes the need for proactive intervention. These principles aim to strike a balance between promoting AI's potential for innovation and ensuring consumer safety. The CMA's proposed guiding principles focus on crucial areas like accountability, access, diversity, choice, flexibility, fairness, and transparency. These principles aim to guide FM developers and deployers toward responsible AI development and use. The CMA plans to engage extensively with stakeholders to refine these principles further. Stay tuned for updates in early 2024 as they continue shaping AI markets for the betterment of all. #ResponsibleAI#AIRegulation#ConsumerProtection#Competition#FoundationModels#CMAAIprinciples